in reply to Re: Pearls (not really) of Perl programming
in thread Pearls (not really) of Perl programming
The writer is using short-circuiting to exit the block with -1 or 1 values; so that listtype sorts before listcode before funclist before every thing else.
I don't write that way. This seems to rely on luck as the block may yield "" which sort is not advertised to accept. I think it needs a catch-all or ( $a cmp $b ).
Be well.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Pearls (not really) of Perl programming
by ysth (Canon) on Nov 24, 2004 at 23:53 UTC | |
by rir (Vicar) on Nov 29, 2004 at 18:28 UTC | |
by Courage (Parson) on Dec 01, 2004 at 15:21 UTC | |
by htoug (Deacon) on Dec 01, 2004 at 18:49 UTC | |
by Courage (Parson) on Dec 01, 2004 at 23:35 UTC | |
by ysth (Canon) on Dec 01, 2004 at 16:49 UTC |