in reply to Re: min $#a, $#b > $#b
in thread min $#a, $#b > $#b
Adding scalar seems to fix it..
use List::Util qw( min ); my @one = (1); for my $_in (1..5) { push @_x, "$_in"; my $x_max = min scalar($#_x), $#one; print "SET my \$x_max $x_max = min \$#_x $#_x, \$#one $#one;\n"; } SET my $x_max 0 = min $#_x 0, $#one 0; SET my $x_max 0 = min $#_x 1, $#one 0; SET my $x_max 0 = min $#_x 2, $#one 0; SET my $x_max 0 = min $#_x 3, $#one 0; SET my $x_max 0 = min $#_x 4, $#one 0;
Though I don't quite understand why. Real bug perhaps?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: min $#a, $#b > $#b
by Eily (Monsignor) on Jan 13, 2016 at 08:55 UTC | |
Re^3: min $#a, $#b > $#b
by FreeBeerReekingMonk (Deacon) on Jan 12, 2016 at 21:11 UTC |
In Section
Seekers of Perl Wisdom