No such thing as a small change | |
PerlMonks |
RE: Presort's Costby turnstep (Parson) |
on Jul 26, 2000 at 17:59 UTC ( [id://24484]=note: print w/replies, xml ) | Need Help?? |
Yes, simple sorting requires a lot of memory, but even a more complex sort requires that at the very least you read each record once. Why not just grab the information while you are there, as in my example program above? I agree that a sorted file is far better, and you'd probably want to get it sorted at some point, but I would not call it the only "sane" way! :)
In Section
Seekers of Perl Wisdom
|
|