Newbie alert. The following:
use List::Util qw(max);
use List::MoreUtils qw(apply);
my @list = (
{ 'name' => 'foo' , 'value' => 3 } ,
{ 'name' => 'bar' , 'value' => 31 } ,
{ 'name' => 'longname' , 'value' => -33 } ,
{ 'name' => 'grill' , 'value' => 333 } ,
);
print max apply { length $_->{name} } @list;
Outputs,
HASH(0x2e47c28)
Instead of 8.
What am I doing wrong?