Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: multidimensional array printing

by Anonymous Monk
on Aug 26, 2012 at 17:31 UTC ( #989852=note: print w/replies, xml ) Need Help??

in reply to Re: multidimensional array printing
in thread multidimensional array printing

Why not simply like this:
print "START: Interface report on $hostname\n"; print join(" ", map @{$_}, @dat) . "\n"; print "END: Interface report on $hostname\n";

Replies are listed 'Best First'.
Re^3: multidimensional array printing
by Anonymous Monk on Aug 26, 2012 at 17:34 UTC
    Or much simple:
    print "@{$_}\n" for @dat;
Re^3: multidimensional array printing
by chanslor (Acolyte) on Sep 01, 2012 at 03:23 UTC
    Almost there, here is the output with your suggestion:
    START: Interface report on host1 hme0 UP hostname hme1 UP hostname END: Interface report on host1
    I need to figure out when a new interface come by and give a new line...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989852]
Discipulus open a red wine bottle and ..
Discipulus adds tozzetti alle mandorle to the platter on the sideboard.
[Discipulus]: the most monastic cookie!
[choroba]: Discipulus BTW, I loved Settembrini by Mulino Bianco years ago in Italy
[choroba]: then they stopped producing them...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2017-04-27 10:34 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (503 votes). Check out past polls.