tamaguchi has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w my @arr=('a', 'b', 'c'); my @aroa; push(@aroa, [@arr]);
If I would like to print the first element in the first
subarray I can do:
print"$aroa[0][0]\n";
print"$aroa[0]\n";
print"@$aroa[0]\n";
Edit: g0n - code tags
2006-04-10 Retitled (AROA -> AOA) by GrandFather to aid searching
Original title: 'How to print subarray of AROA?'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to print subarray of AOA?
by McDarren (Abbot) on Apr 09, 2006 at 13:16 UTC | |
by tamaguchi (Pilgrim) on Apr 09, 2006 at 13:57 UTC | |
by moklevat (Priest) on Apr 09, 2006 at 14:08 UTC | |
by xdg (Monsignor) on Apr 09, 2006 at 16:51 UTC | |
by ww (Archbishop) on Apr 09, 2006 at 14:47 UTC | |
|
Re: How to print subarray of AOA?
by xdg (Monsignor) on Apr 09, 2006 at 13:15 UTC | |
|
Re: How to print subarray of AOA?
by tirwhan (Abbot) on Apr 09, 2006 at 13:15 UTC |