in reply to Problem with adding variable from array
There is some wierd stuff going on in:
# $node = ("$ARGV[1]"); # $interface = ("$ARGV[3]"); chomp ($node); chomp ($interface); my ($session, $error) = Net::SNMP->session( -hostname => shift || $node, -community => shift || $community
The commented out code implies you are picking up the second and fourth parameters on the command line, but the session call pulls the first and second parameters off the command line. Perhaps you could try something simple like:
perl -e "print $ARGV[0]" first
which should print first when run from the command line as a sanity check?
|
|---|