in reply to Substring Sort

All this complexity. This works fine, assign instead of print if you want.

print sort map{/\|(\w+)$/}@origarray;

tachyon

Replies are listed 'Best First'.
(tye)Re4: Substring Sort
by tye (Sage) on Jun 01, 2001 at 18:31 UTC

    That throws away the parts of the strings that we aren't comparing. The point is usually to sort the original strings, just using the substring for the purposes of comparing.

            - tye (but my friends call me "Tye")