use warnings; use strict; my $arref = [ ['text1','Num1'], ['text2','Num2'], #and so on ]; for (@{ $arref }) { print "----\n"; foo($_); } sub foo { my $aref = shift; for (@{ $aref }) { print "$_\n"; } } __END__ ---- text1 Num1 ---- text2 Num2
In reply to Re: Perl Array of array - How to call a function for each array?
by toolic
in thread Perl Array of array - How to call a function for each array?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |