chanslor has asked for the wisdom of the Perl Monks concerning the following question:
Currently show this output:print "START: Interface report on $hostname\n"; for(my $i = 0; $i <= $#dat; $i++){ # $#dat gives the highest index from the array for(my $j = 0; $j <= $#dat ; $j++){ print "$dat[$i][$j] "; } print "\n"; } print "END: Interface report on $hostname\n";
I would just like for the entire hme0 UP with IP and hostname all on one line.... here is where I push the data:START: Interface report on nodename hme0 UP xxx.xxx.xxx.xxx hme1 UP xxx.xxx.xxx.xxx END: Interface report on nodename
Thanks...push @dat, [ $interface_name, $ifstatus ] ; then later... $dat[$ip_count][2]=$ipaddr;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: multidimensional array printing
by toolic (Bishop) on Aug 25, 2012 at 23:31 UTC | |
|
Re: multidimensional array printing
by Marshall (Canon) on Aug 26, 2012 at 05:19 UTC | |
|
Re: multidimensional array printing
by Anonymous Monk on Aug 26, 2012 at 12:28 UTC | |
by Anonymous Monk on Aug 26, 2012 at 17:31 UTC | |
by Anonymous Monk on Aug 26, 2012 at 17:34 UTC | |
by philiprbrenan (Monk) on Aug 26, 2012 at 21:01 UTC | |
by chanslor (Acolyte) on Sep 01, 2012 at 03:23 UTC |