JoeJaz has asked for the wisdom of the Perl Monks concerning the following question:
... my @sheets; my @column = split /(\s)+/, $line; @sheets1 = @column;In this example, @column is the one-dimensional array and @sheets is the two-dimensional array. Howerver, this doesn't quite work the way I would expect. I don't want to have to resort to nested for loops if I can help it. Figured there should be some simple syntax for doing this. I'm having difficulty finding examples of this on Google. Any advice is much appreciated. Thanks for reading. Joe
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: One Dimensional Array into Two
by moritz (Cardinal) on Aug 21, 2008 at 22:34 UTC | |
by JoeJaz (Monk) on Aug 22, 2008 at 17:10 UTC | |
|
Re: One Dimensional Array into Two
by gone2015 (Deacon) on Aug 21, 2008 at 22:36 UTC | |
by moritz (Cardinal) on Aug 21, 2008 at 22:40 UTC | |
by JoeJaz (Monk) on Aug 22, 2008 at 17:06 UTC | |
|
Re: One Dimensional Array into Two
by FunkyMonk (Bishop) on Aug 21, 2008 at 22:36 UTC | |
by gone2015 (Deacon) on Aug 22, 2008 at 14:43 UTC | |
by FunkyMonk (Bishop) on Aug 22, 2008 at 15:01 UTC | |
by JoeJaz (Monk) on Aug 22, 2008 at 17:57 UTC | |
by gone2015 (Deacon) on Aug 22, 2008 at 20:02 UTC | |
by JoeJaz (Monk) on Aug 22, 2008 at 17:40 UTC | |
|
Re: One Dimensional Array into Two
by llancet (Friar) on Aug 22, 2008 at 04:49 UTC | |
by JoeJaz (Monk) on Aug 22, 2008 at 17:51 UTC |