- or download this
for (my $i = 0; $i < @a; $i++) {
# Do stuff with @a and @b
}
- or download this
my %temp;
@temp{@a} = @b;
while (my ($a_val, $b_val) = each %temp) {
# Do stuff with $a_val and $b_val
}
- or download this
use mapcar; # This is on a node [tye] posted somewhere on PM
...
foreach my $vals (@temp_arr) {
# Do stuff with $vals->[0] (from @a) and $vals->[1] (from @b)
}