By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,178 Members | 987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,178 IT Pros & Developers. It's quick & easy.

Help with Net::Telnet perl module

P: 1

I am trying to execute a simple perl script, i have installed net::telnet module.
I have many perl scripts and all are running fine, except this first perl script i m trying to write for net telnet module.

Net::Telnet module status

Sat Dec 19 14:21:40 2009: "Module" Net::Telnet
"installed into: /usr/lib/perl5/site_perl/5.8.5"
"LINKTYPE: dynamic"
"VERSION: 3.03"

Perl version is perl v5.8.5

#!/usr/bin/perl -w

use Net::Telnet;
[root@localhost abdul]# ./
./ line 4: use: command not found
./ line 5: use: command not found
[root@localhost abdul]#

I have to telnet to any of my router or switch .. but the program is givng the above error, i am new to this perl and net telnet module.

Apr 6 '10 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 100+
P: 589
Looks like your shebang line is wrong and your default shell (probably sh) is trying to execute the script instead of perl.
Apr 6 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.