```{index} single: maxstr; List::Util function ``` ```{index} single: List::Util::maxstr; Perl function ``` # maxstr Return the lexically largest value in the list. ## Synopsis ```perl my $s = maxstr @values; my $s = maxstr 'A'..'Z'; # 'Z' ``` ## What you get back The first (original) list element whose stringification compares greater than every other element's stringification under `gt` (byte-wise comparison). Empty list yields `undef`. ## Examples ```perl my $s = maxstr 'hello', 'world'; # 'world' my $s = maxstr qw( foo bar baz ); # 'foo' my $s = maxstr (); # undef ``` ## Differences from upstream Fully compatible with upstream. ## See also - `minstr` — string-wise minimum. - `max` — numerical maximum.