List::Util
use List::Util;
use List::Util qw(first max maxstr min minstr reduce shuffle sum);
sub test {
my @numbers = (1, 2, 3, 4, 5, 6, 7);
# Get first element
my $first_number = first { defined($_) } @numbers;
print $first_number, "\n";
# Get max element
my $max_number = max @numbers;
print $max_number, "\n";
# Shuffle, reorder
my @shuffle_numbers = shuffle @numbers ;
print @shuffle_numbers, "\n";
# Sum
my $sum = sum @numbers;
print $sum, "\n";
# Reduce
}
&test() ;
1 ;