in reply to how do i read in ANY 2d array
Update: To boil it down as short as possible, this code will build a 2D array of whatever data is in the DATA segment.
#!/user/bin/perl -w use strict; use Data::Dump qw(pp); my @AoA; push @AoA, [split] while (<DATA>); print pp(\@AoA); __DATA__ 11 12 13 14 15 16 17 21 22 23 24 25 26 27 31 32 33 34 35 36 37 41 42 43 44 45 46 47 51 52 53 54 55 56 57
|
|---|