List::Util
- Core perl module (since 5.8)
use List::Util qw( reduce any all none notall first max maxstr min minstr product sum sum0 pairs unpairs pairkeys pairvalues pairfirst pairgrep pairmap shuffle uniq uniqnum uniqstr ); my @cards = shuffle( 0..51 ); my $best = max(@scores); my $worst = min(@scores); my $mean = sum(@scores) / @scores;