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"; #### START: Interface report on nodename hme0 UP xxx.xxx.xxx.xxx hme1 UP xxx.xxx.xxx.xxx END: Interface report on nodename #### push @dat, [ $interface_name, $ifstatus ] ; then later... $dat[$ip_count][2]=$ipaddr;
## START: Interface report on nodename hme0 UP xxx.xxx.xxx.xxx hme1 UP xxx.xxx.xxx.xxx END: Interface report on nodename ##
## push @dat, [ $interface_name, $ifstatus ] ; then later... $dat[$ip_count][2]=$ipaddr;