Shouldn't $max_index be $min_index and look like this?
There is no need to localize or subvert $a and $b. Just make the coderef act on $_[0] and $_[1] or their lexical copies.my $min_index = @$a_ref < @$b_ref ? $#$a_ref : $#$b_ref;
After Compline,
Zaxo
In reply to Re: A classic use of prototypes: map2
by Zaxo
in thread A classic use of prototypes: map2
by tkil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |