in reply to Using Variable outside of loop with Net::SSH
You can't get at the loop's inner value of $_ outside the loop, because the while command automatically localizes it. Just do it the way you do here with $result, by assigning it to a variable that does exist outside the loop.
Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using Variable outside of loop with Net::SSH
by Nich240 (Initiate) on May 08, 2015 at 13:40 UTC | |
by aaron_baugher (Curate) on May 08, 2015 at 13:55 UTC | |
by Athanasius (Archbishop) on May 08, 2015 at 14:32 UTC | |
by Nich240 (Initiate) on May 08, 2015 at 14:37 UTC |