Hi, i have just started using Perl and I'm trying to expand a perl variable within a Unix command in the perl script, for example: -
I want to use the contents of $host for the hostname but when i run the script it just hangs. if anyone could let me know how to expand the variable within the Unix command that would be great.
Thanks
Code:
foreach $host (@lines) { print "$host\n"; $sshcmd = "ssh"; $get = `$sshcmd $host "uptime"`; print "$get\n"; }
Thanks
Comment