Ned --

...and then Ned Cunningham said...
% 
% Great,
% Now how about sorting on the "new" first element of the array each time I
% step through a file???

How about a little more detail?  I'm not sure quite what you mean by
new; you top-posted instead of providing any contextual reference.

Given input of

  a b c d
  e f g h
  i a a a

do you want to sort on the b/f/a elements, or something else?

If you do, then 

  - do you ever need the first elements, or can you just throw them away
    at read time and then sort naturally?

  - is there any reason not to whip up a little sort that's based on that
    element?

In the last case, I envision something about like

  sort { $a[1] <=> $b[1] }

or so...


:-D
-- 
David T-G                      * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg25214/pgp00000.pgp
Description: PGP signature

Reply via email to