Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!rutgers!usc!snorkelwacker!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!mhres!squirrel!jv From: jv@mh.nl (Johan Vromans) Newsgroups: comp.lang.perl Subject: Re: sort Message-ID: <1990Sep1.095742.29385@squirrel.mh.nl> Date: 1 Sep 90 09:57:42 GMT References: <1990Aug21.224327.20194@iwarp.intel.com> <1990Aug22.111018.3329@comp.vuw.ac.nz> <105536@convex.convex.com> <1990Aug29.191454.23527@iwarp.intel.com> <9337@jpl-devvax.JPL.NASA.GOV> <1990Sep01.001741 Sender: jv@squirrel.mh.nl (Johan Vromans) Reply-To: Johan Vromans Organization: Multihouse Automation, the Netherlands Lines: 23 In-Reply-To: Andrew.Vignaux@comp.vuw.ac.nz's message of 1 Sep 90 00:17:41 GMT In article <9337@jpl-devvax.JPL.NASA.GOV>, lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes: > I just had the weirdest thought. The ne and != operators should maybe > return -1 or +1 when the operands aren't equal. Please don't. It will break lots of existing scripts. Moreover, perl is already wierd enough. I can imagine lots of perl novice users shifting back to grep/sed/nawk once they discover that != is not the same anymore as ! == . I hesitate to say so, but I think this deserves a new built-in fuction, e.g 'order($a,$b)' and 'lexorder($a,$b)'. The latter can also take internationalization issues into account, so you can have quick and dirty string comparisons using eq ne gt ge le lt, and formal correct (hence a bit slower) using lexorder. Johan -- Johan Vromans jv@mh.nl via internet backbones Multihouse Automatisering bv uucp: ..!{uunet,hp4nl}!mh.nl!jv Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62911/62500 ------------------------ "Arms are made for hugging" -------------------------