in reply to schwartzian transform
Your problem is in the first map (or the last map reading left to right which is not how I think when I'm building a Schwartzian transform). The /.+,/ in
is only returning the number of matches (or 1 in this case). As a result it should give you back the original list. If you're trying to sort on computed fields, you need to extract them first and _then_ bundle them up in the anonymous array.map { [ $_, /.+,/ ] }
So something like
map { my @fields = split /,/; [ $_, $field[1] ] }
might get you closer to what you're looking for.
Once you've mastered that, you'll next want to look at the Orcish manoeuvre which speeds up your sorts
Sometimes I can think of 6 impossible LDAP attributes before breakfast.
In Section
Seekers of Perl Wisdom