Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Net::Telnet issue getting command output

by RichardK (Parson)
on Feb 12, 2016 at 08:49 UTC ( #1155052=note: print w/replies, xml ) Need Help??


in reply to Net::Telnet issue getting command output

The string concatination operator . has forced the array into scalar context, and so the list returns it's length not its content.

Try runing this to see some different ways of doing it

my @tmp = (1,2,3); print @tmp; print "\n"; print @tmp , "\n"; print @tmp . "\n"; print "@tmp" , "\n"; print join("\n" , @tmp);

Replies are listed 'Best First'.
Re^2: Net::Telnet issue getting command output
by gballanti (Initiate) on Feb 12, 2016 at 12:05 UTC

    Hello Richard, thank you for the answer
    you have reason using the concatenation operator "." how I did
    Is not a good way to have array printed.
    greetings

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2020-08-12 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (66 votes). Check out past polls.

    Notices?