Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Need help getting output from Telnet into a string or array

by TravisC (Novice)
on Mar 15, 2012 at 21:49 UTC ( #959869=note: print w/replies, xml ) Need Help??


in reply to Re^3: Need help getting output from Telnet into a string or array
in thread Need help getting output from Telnet into a string or array

ok with plenty of fiddling around here's what I've been able to decipher. I pass
my (@array)=$telnet->cmd(string => 'ls', prompt => '/=>/');
gives be one line, which is blank. Though if I pass this line
my ($a, $b, $c)=$telnet->cmd(string => 'ls', prompt => '/=>/');
and print the results I get 3 lines of output so the system will pass in list context, but I fear I'm missing why it won't pass it to an array. below is the output from the a,b,c variables.
btm.swi secondary.swi cfg/

Any thoughts?

thanks for all your input!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://959869]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2019-09-19 21:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (251 votes). Check out past polls.

    Notices?