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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: schwartzian transform
by Laurent_R (Canon) on Oct 14, 2014 at 09:41 UTC | |
by jonadab (Parson) on Oct 14, 2014 at 10:57 UTC | |
by Ea (Chaplain) on Oct 14, 2014 at 13:45 UTC | |
Re^2: schwartzian transform
by AnomalousMonk (Archbishop) on Oct 14, 2014 at 14:49 UTC |
In Section
Seekers of Perl Wisdom