in reply to working with Expect module
Change this:
my @parameters = ('$_', 'uptime');
to this:
my @parameters = ($_, 'uptime');
Your version is using THE NAME of variable $_ as an IP address, rather than THE CONTENTS. Single (') and double (") quotes are different, so if you used:
my @parameters = ("$_", 'uptime');
your code would have worked, because inside double quotes, the variables contents would replace its name in the string. However, just putting quotes around a variable name is discouraged.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: working with Expect module
by slayedbylucifer (Scribe) on Dec 28, 2010 at 07:11 UTC | |
by roboticus (Chancellor) on Dec 28, 2010 at 13:03 UTC |