# Execute the command open( FI ,"< $ciscomm_conf") || die ("Cannot find configuration file containg commands to be run at $ciscomm_conf:$!"); while() { 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); }