Sub( \%hash ); sub Sub { # example avoiding copying data around in bulk. my $href = shift; for my $aref ( keys %$href ) { # loop the hash for ( my $idx=0; $idx <= $#$aref; $idx++ ) { # loop array Process( $aref -> [$idx] ); } } } sub Process { my $scalar = shift; # whatever with the array element }
In reply to Re: hash of arrays to a subrutine?
by DungeonKeeper
in thread hash of arrays to a subrutine?
by tamaguchi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |