in reply to A classic use of prototypes: map2
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A classic use of prototypes: map2
by tkil (Monk) on May 02, 2004 at 07:04 UTC | |
by Zaxo (Archbishop) on May 02, 2004 at 07:10 UTC | |
by tye (Sage) on May 02, 2004 at 15:27 UTC |