in reply to Perl Array of array - How to call a function for each array?
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
|
|---|