mmartin has asked for the wisdom of the Perl Monks concerning the following question:
# @records contains the data from the file. for (my $x = 0; $x <= $#records; $x++) { for (my $y = 0; $y <= ; $y++) { $AoA[$x][$y] = split ' ', $records[$x]; } }
OWNER /prod-data/J 00151120273 X jmorg 3584038 247 ts/49 13:38:12 Jul +20 WAITING /prod-data/J 00151120273 X jmorg 2015244 134 s/109 13:48:32 Ju +l 20 WAITING /prod-data/J 00151120273 X gdavi 1359996 62 ts/20 13:54:22 Jul + 20 OWNER /prod-data/J 001!L!311895 X jmorg 2015244 134 s/109 13:48:32 Jul + 20 WAITING /prod-data/J 001!L!311895 X jmorg 5713932 191 ts/46 14:01:42 J +ul 20 OWNER /prod-datahi 001!10274882 X rfuse 3354796 61 ts/43 13:39:02 Jul +20 WAITING /prod-datahi 001!10274882 X jmorg 3584038 247 ts/49 13:39:22 J +ul 20
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to split a single array into a two-dimensional array?
by ikegami (Patriarch) on Aug 01, 2011 at 20:31 UTC | |
|
Re: How to split a single array into a two-dimensional array?
by BrowserUk (Patriarch) on Aug 01, 2011 at 20:31 UTC | |
|
Re: How to split a single array into a two-dimensional array?
by mmartin (Monk) on Aug 02, 2011 at 14:20 UTC |