in reply to Sorting colon-delimited records
altho there are faster ways, like storing each second field in a hash as key :)@a=qw(foo:baz foo:bar); print sort { (split(/:/,$a))[1] cmp (split(/:/,$b))[1] } @a;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Sorting
by mephit (Scribe) on May 31, 2002 at 21:39 UTC | |
by Beatnik (Parson) on May 31, 2002 at 21:54 UTC | |
by RhetTbull (Curate) on Jun 04, 2002 at 20:38 UTC |