A collection of list-related subroutines. As of Perl 5.8, List::Util is included with the Perl source kit.
You can get the first item of a list (that matches the condition in BLOCK) like so:
#!/usr/local/bin/perl -w use List::Util qw(first); my @ll = qw(one two three); my $fir = first { defined($_) } @ll; print "$fir "; # Prints 'one'
List::Util implements (but does not export) the following methods.
18.117.138.104