Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
This is not that baroque once you grasp how the writer is
approaching the sort. I looked at this quickly and knee-jerked that the logical expression is Wrong then
I realized that it was in a sort block.
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. In reply to Re^2: Pearls (not really) of Perl programming
by rir
|
|