title: Why do I get 'use: command not found' when I run my Perl script?
body: <p>I'm new to Perl. And I have used following code from one forum to connect to one of the server. but throwing error messages</p>
  
  <pre><code>[root@Cus]# cat tt.pl
  #!/usr/bin/perl
  use Net::Telnet;
  $telnet = new Net::Telnet ( Timeout=&gt;2, Errmode=&gt;'die');
  $telnet-&gt;open('10.0.0.28');
  $telnet-&gt;waitfor('/login:/');
  $telnet-&gt;print('administrator');
  $telnet-&gt;waitfor('/Password:/');
  $telnet-&gt;print('test');
  $telnet-&gt;waitfor('/switch8-12&gt;/');
  $telnet-&gt;print('whoamI');
  $output=$telnet-&gt;waitfor('/switch8-12&gt;/');
  print $output;
  </code></pre>
  
  <p>But throwing following error messages.</p>
  
  <pre><code>[root@Cus]# ./tt.pl
  ./tt.pl: line 3: use: command not found
  ./tt.pl: line 4: syntax error near unexpected token `('
  ./tt.pl: line 4: `$telnet = new Net::Telnet ( Timeout=&gt;2, Errmode=&gt;'die');'
  </code></pre>