in reply to Sorting files you Have read
That's a bit like asking "How should I drink?". It depends a great deal on what it is you are drinking!
First up:
- What does your data look like?
- How big is the file?
- How often does it need to be done?
- Is sort time important?
- Will the sorted data be reused in some fashion?
Actually, many of those are related to each other.
Because you were good and supplied some code, I'll show you some:
my @contents = sort <SOMELIST>; print @contents;
and because I'm kind I'll give you some hints:
- Check through the Tutorials section
- Read up about sort
- Study Schwartzian Transform and the replies to What is "Schwarzian Transform" (aka Schwartzian)
- Super Search "sort column" in SoPW and read some of the wealth of material already posted
DWIM is Perl's answer to Gödel
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Sorting files you Have read
by brusimm (Pilgrim) on Nov 16, 2006 at 21:30 UTC | |
by GrandFather (Saint) on Nov 16, 2006 at 21:56 UTC | |
by brusimm (Pilgrim) on Nov 16, 2006 at 23:09 UTC | |
by markh (Scribe) on Nov 16, 2006 at 22:25 UTC | |
by GrandFather (Saint) on Nov 16, 2006 at 23:07 UTC |
In Section
Seekers of Perl Wisdom