chimni has asked for the wisdom of the Perl Monks concerning the following question:
I even tried reading the file in an array and doing a# Execute the command open( FI ,"< $ciscomm_conf") || die ("Cannot find configuration file c +ontaing commands to be run at $ciscomm_conf:$!"); while(<FI>) { my $ciscommand = $_; if(( $ciscommand !~ m/\#/ ) && ($ciscommand !~ m/^\s+$/)) { @cmd_output = $cs->cmd( String => $ciscommand,Timeout =>60); if (!@cmd_output) { push(@cmd_output," command failed or returned null input +\n"); } } } cose FI;
foreach $tmp (@cms) { @cmd_output = $cs->cmd( String => $ciscommand,Timeout =>60); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Net::Telnet::Cisco usage
by tachyon (Chancellor) on Dec 22, 2003 at 07:20 UTC | |
by chimni (Pilgrim) on Dec 22, 2003 at 08:21 UTC | |
by tachyon (Chancellor) on Dec 22, 2003 at 11:51 UTC | |
by tachyon (Chancellor) on Dec 23, 2003 at 03:07 UTC | |
Re: Net::Telnet::Cisco usage
by zengargoyle (Deacon) on Dec 22, 2003 at 07:13 UTC | |
Re: Net::Telnet::Cisco usage
by jcpunk (Friar) on Dec 22, 2003 at 07:35 UTC |