in reply to How to sort a list of strings by an arbitrary field separator

Please see perlfaq4, entry "How do I sort an array by (anything)?".

For obtaining a particular field, (split /\~/, $str, $field + 2)[$field] is useful (if $field starts counting at 0)

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^2: How to sort a list of strings by an arbitrary field separator
by mfv1984 (Initiate) on Aug 25, 2010 at 11:58 UTC

    Thanks you Moritz and Corion.
    I didn't think of looking up in the FAQ's before asking, sorry.
    This 'Schwartzian Transform' thing seems pretty nifty. Now I have something good to learn the rest of the day!