Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm using the code below to do my sort, but it doesn't seem to be working'04=critical' '02=informational' '01=unknown' '10=test' '03=warning' '08=foo'
Any Ideas?@values = sort { substr($a,1) <=> substr($b,1) } @values;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: substr sort ??
by davorg (Chancellor) on Aug 22, 2003 at 11:50 UTC | |
by dragonchild (Archbishop) on Aug 22, 2003 at 12:56 UTC | |
|
Re: substr sort ??
by guha (Priest) on Aug 22, 2003 at 11:33 UTC | |
|
Re: substr sort ??
by CombatSquirrel (Hermit) on Aug 22, 2003 at 12:02 UTC | |
by dbwiz (Curate) on Aug 22, 2003 at 14:32 UTC | |
by CombatSquirrel (Hermit) on Aug 22, 2003 at 15:42 UTC | |
|
Re: substr sort ??
by flounder99 (Friar) on Aug 22, 2003 at 12:21 UTC | |
by kesterkester (Hermit) on Aug 22, 2003 at 14:12 UTC | |
|
Re: substr sort ??
by Zeroth (Beadle) on Aug 22, 2003 at 11:42 UTC |