Since the Net::SSH::Channel object is also a tied filehandle, you can avoid all the C-style read buffering:
$channel->exec($command); my @array = <$channel>; # read output lines into an array # or my %hash = map { $_ => undef } <$channel>; # read output lines into a +hash's keys
Aaron B.
Available for small or large Perl jobs; see my home node.
In reply to Re: redirect stdout into hash
by aaron_baugher
in thread redirect stdout into hash
by doctorspears
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |