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

[Clip] Re: Sort by Size

Expand Messages
  • Jody
    Hi David, ... Thanks David. It worked well and ran fast, but I wanted to know the best method using a Clip which is what I need it in. Claes gave me what I
    Message 1 of 4 , Mar 28, 2000
    • 0 Attachment
      Hi David,

      >> Using a Clip,
      > If you are willing to use a little perl code in your clip, this
      > should work:
      >
      > while (<>){push @array, $_;}
      > sub bylength {length($a) <=> length($b);}
      > print sort bylength @array;

      Thanks David. It worked well and ran fast, but I wanted to know
      the best method using a Clip which is what I need it in. Claes
      gave me what I needed, well, two lines of his Clip. Since I have
      to so a number of loops searching for different domains formats
      and append them anyway, a Clip is just about as fast when all
      said and done.

      Claes, I tried using GetField instead of Select hoping it would
      be faster, but since GetField actually selects the field also
      there was no speed difference. However, I ran the same test
      using your Clip on my now fixed machine :) and it finished the
      10K + lines in less than a minute which is irrelevant to my
      actual Clip though since I only needed the method. :) Thanks
      much!

      Bye for now,
      Jody Adair
      Prov. 3:5-7; 4:23

      http://www.sureword.com/sojourner
      http://www.sureword.com/kjb1611
      http://www.sureword.com/notetab
    Your message has been successfully submitted and would be delivered to recipients shortly.