I agree with everyone else that List::Util::max() is the way to go here, but for your readability concerns, the layout of your code can have a huge influence on its readability. A slight restructuring can allow you to loose some of the parens, and make things clearer:
use constant PADDING => 2; my $col_width = PADDING + ( sort { $b <=> $a } map { length } map { ref eq 'ARRAY' ? @$_ : $_ } %lists )[ 0 ]; ## Longest key or value
In reply to Re: I fear my code is unreadable
by BrowserUk
in thread I fear my code is unreadable
by Boldra
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |