in reply to Re: a little problem with sorting my data
in thread a little problem with sorting my data

On your second one: That will group by ID, but I don't believe it will sort by ID. That is to say: You will get all the records with a certain ID together, but you won't get the ID's themselves in any particular order. (Unless values does some subtle sorting I'm not aware of.)

Replies are listed 'Best First'.
Re^3: a little problem with sorting my data
by ikegami (Patriarch) on Jul 27, 2009 at 18:25 UTC

    I had written a line about that, but I must have deleted it by accident.

    Indeed, it groups but it doesn't sort. I had already provided a solution for sorting. If the OP also wants to sort the ids and then do something with them, he can do:

    for ( sort <$fh> ) { my @fields = ...; ... }