in reply to Re: Sorting complex records
in thread Sorting complex records
sort_arrayref( $data, -compare=>'numeric', sub { substr (shift)->[0] +, 2 }, 3 )
There's also a (poorly-documented) interface to let you specify this in data rather than code:
sort_arrayref( $data, -compare=>'numeric', -extract=>'compound', [ index => 0, substr => 2 ], [ index => 3 ] )
|
|---|