Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://959869]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-24 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found