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)
|
|---|
| 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 | |
by bart (Canon) on Aug 25, 2010 at 13:40 UTC |