in reply to Rule-based sorting
Remember, sort is an abstraction of sorts :) If you can express, in code, whether $a is >, <, or == $b, you can use sort.sub compare_lines { # return a 1,0,or -1 depending on which of $a or $b is larger } my @lines = <FILE>; sort compare_lines @lines;
MeowChow s aamecha.s a..a\u$&owag.print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Rule-based sorting
by runrig (Abbot) on Apr 10, 2001 at 20:38 UTC |