Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Doingshift (sort ( @array ) );
is OK but down right un-perlish@array = sort @array; shift @array;
By the way, I'm not really trying to get the min value of the array. I really just want to shorten the array, ala;
Something tells me there is a better way. Any suggestions?if (@$array[$_] == $number) { @$array[$_] = 0; @array = (sort {$a <=> $b} (@$array)); shift; }
|
|---|