Try changing $Line2 to $Line in the following:
if ( $Line2 =~ m/^hostname / ) { @Data2 = split( ' ', $Line2 ); $Rname = $Data2[ 2 ] ; last ; }
In reply to Re^5: NET::OpenSSH to execute multiple commands
by Kenosis
in thread NET::OpenSSH to execute multiple commands
by hmb104
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |