The array @Cylinders you constructed has two elements, one stores $1 and
the other stores $2. That's why you get "an array with 2 lines". The two
lines correspond to the two elements of the array.
Maybe you should further split $1 and $2. Or, try to transpose the array
you currently get. Providing more details about the data structure will
be helpful to solve the problem.
On 2011-12-11 19:57, kurtz le pirate wrote:
Hello,
I want to have a two dim array. I build it like this:
my @Cylinders;
/.*(<.*>),(<.*>).*/;
push @{$Cylinders[0]}, $1;
push @{$Cylinders[1]}, $2;
Seems to work but a get an array with '2' lines and 'n' columns
instead of 'n' lines with '2' columns'.
display array with 'print Dumper \@Cylinders;' confirm this.
where is my mistake ?
thank if you can help me.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/