Loading ...
Sorry, an error occurred while loading the content.

PERL sort help please?

Expand Messages
  • Eric Via
    Greetings folks! I m having a heck of a time understanding the way in which Perl can sort - the whole reason I m trying to convert a standard UNIX sort into a
    Message 1 of 1 , Oct 30, 2000
    • 0 Attachment
      Greetings folks!

      I'm having a heck of a time understanding the way in which Perl can sort -
      the whole reason I'm trying to convert a standard UNIX sort into a Perl sort
      is I want to see which one's faster - so if you can tell me right now that a
      Perl sort won't move as quickly as a standard UNIX I'll be happy.

      My sort looks like:

      sort -o mysort.srt -T /data/$PRJ_ENVIRONMENT/evia/work -k 1.3,1.18
      -k 1.1,1.1 -k 1.59r,1.66 -k 1.2,1.2 sortthis.txt sortthat.txt

      (Which is basically sorting 2 files:

      Sort by position 1.3 to 1.18,
      Sort by position 1.1 to 1.1
      Reverse sort by positoin 1.2 to 1.2

      Fair enough - now I want to (maybe) sort this using Perl, and, being brand-
      new to Perl, I am confused - is there a way to define how I sort based on
      POSITION like using the standard "sort" command??

      Any advice would be greatly appreciated!

      Eric



      ------------------------------------
      Eric Via
      ericvia@...
      AOL Instant Messenger: Eric C Via
      My home page: http://web2.airmail.net/ericvia/ericpage.html
      (Buddhism, VW New Beetle, Mercedes, Spam, Jokes, D.B. Cooper,
      Trains, & more!)
      FREE TIBET!
      ------------------------------------
      "By mind the world is led; by mind the world is drawn, all men own
      the sovereignty of mind" - The Buddha
    Your message has been successfully submitted and would be delivered to recipients shortly.