[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [Fun With Perl] Everything should be kept as simple aspossible...



At 20:13 -0400 06/17/1999, Steve Willer wrote:
>What is wrong with this?
>
>  cat names.txt|sed 's/||/, /g'|sort +0 +1


It's a Perl list :-)

Maybe he wanted something as part of other code...
Maybe he's not on Unix (the question did come from the MacPerl list :-)

>there's someting to be said for a nice, simple pipe. My single-line pipe
>does a more correct sort than the perl equivalents you posted because it
>sorts last name before first, rather than sorting the line as a whole.

Given that the result is the same... why is this "more correct"? :)

-- --
        |\      _,,,---,,_       Vicki Brown <vlb@cfcl.com>
  ZZZzz /,`.-'`'    -.  ;-;;,_   Journeyman Sourceror: Scripts & Philtres
       |,4-  ) )-,_. ,\ (  `'-'  P.O. Box 1269  San Bruno  CA  94066
      '---''(_/--'  `-'\_) http://www.cfcl.com/~vlb  http://www.macperl.org

==== Want to unsubscribe from this list? (Don't you love us anymore?)
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org

</x-flowed>