What's the best way to find min and max values in an array with undefined members without getting error messages?

[email protected] (hw via beginners)
Newsgroups perl.beginners
Message-ID <[email protected]>
# perl -e '
use warnings;
use List::Util qw(min);
printf("%d\n", min(1, undef));
'
Use of uninitialized value in subroutine entry at -e line 1.
Use of uninitialized value in printf at -e line 1.
0


Are there alternative min and max functions that skip undef array
members, or I'm better off to write my own?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.