in reply to iterate through two-dimensional array
Or even slightly simpler:DB<1> $var_ref_array = [ [ 5349, 5350, 6205 ],[ 5355, 5356, 17 +77741, 1777742 ],[ 5699, 1792850, 1792851 ] ]; DB<2> for (@$var_ref_array) { for (@$_) { print "$_ \t";} print "\n" +}; 5349 5350 6205 5355 5356 1777741 1777742 5699 1792850 1792851
Having shown that, this is for fun, I should add this may not be not a coding style that I would necessarily recommend.DB<3> for (@$var_ref_array) { print "$_ \t" for @$_; print "\n";} 5349 5350 6205 5355 5356 1777741 1777742 5699 1792850 1792851
|
|---|