H
HC
Hi all,
I wrote a script and I can nog get the errmode to work right but before I
start asking questions on the errmode problem I wanted to ask another
question first.
When doing a script using Net::Telnet to telnet to several hosts where would
the $obj = Net::Telnet->new( ) be placed in the foreach loop?
$obj = Net::Telnet->new( );
foreach $host (@hosts) {
$obj->open($host);
#do your login and cmd's here
}
OR
foreach $host (@hosts){
$obj = Net::Telnet->new( );
$obj->open($host);
#do loging and cmd's here
}
I asume that using the wrong method might be a reason for the errmode not to
work right. I am using the first method described right now...
Thanks for the help.
HC
I wrote a script and I can nog get the errmode to work right but before I
start asking questions on the errmode problem I wanted to ask another
question first.
When doing a script using Net::Telnet to telnet to several hosts where would
the $obj = Net::Telnet->new( ) be placed in the foreach loop?
$obj = Net::Telnet->new( );
foreach $host (@hosts) {
$obj->open($host);
#do your login and cmd's here
}
OR
foreach $host (@hosts){
$obj = Net::Telnet->new( );
$obj->open($host);
#do loging and cmd's here
}
I asume that using the wrong method might be a reason for the errmode not to
work right. I am using the first method described right now...
Thanks for the help.
HC