Hello, Mr. Zalewski,

I just checked one of my scripts that uses Net::Telnet, and I invoked the
package without parentheses, a la

use Net::Telnet;

rather than the way you have it,

use Net::Telnet ();

so perhaps give that a try? Cheers,

-Mark Beihoffer
Network Architect

http://perlmonks.com/index.pl?node_id=45946&lastnode_id=131


----- Original Message -----
From: Mr. Zalewski <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 06, 2001 3:13 PM
Subject: [Perl-unix-users] Net::Telnet


> I'm trying to set up Net::Telnet  so I may or may not have done it
correctly.  It also gave an example program that I tried, but I got an
error.
> Example program:
> use Net::Telnet ();
> $t = new Net::Telnet (Timeout => 10, Prompt => '/bash\$ $/');
> $t->open ("sparky");
> $t->login($username, $passwd);
> @lines = $t->cmd("/usr/bin/who");
> print @lines;
>
> sparky is the machine name.
> username and passwd   I replaced with the appropriate.
>
> The error I get is:
> Can't locate object method "Use" via package Net::Telnet at test.pl line
1.
>
> I used the install instructions of:
> perl makefile.pl \INSTALLSITELIB=$HOME/lib/perl \
>                   INSTALLMAN3DIR=$HOME/lib/perl/man/man3
> make
> make test
> make pure_install
>
> Any thoughts of what I missed and/or need to do is greatly appreciated.
>
> The url I got this from is:
> http://www.perlfect.com/articles/telnet.shtml
>
> Thanks
>
>
>
> Win a LAPTOP Computer and get your FREE KEYEMAIL.COM E-mail Account at
http://keye.com
> _______________________________________________
> Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users
>

_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users

Reply via email to