Ranking files, largest to smallestby ewexperts (Initiate)
|on May 27, 2008 at 05:18 UTC||Need Help??|
ewexperts has asked for the
wisdom of the Perl Monks concerning the following question:
Alright, I have a series of files that I need to access the first line in. They are all ending in .total (example: blackdeath.total and dandelion.total) and are all in the same directory.
What I'd like to do is have perl organize them by value, from largest to smallest. As a step to this, I've created a textfile with the filename for each one of these on a seperate line.
The Text File:
Now, I'm not exactly sure how to do this, but this is what I have so far:
Well, it's a start. Unfortunately, it doesn't work and I think part of it is that chomp is the wrong command. Here's what it's displaying: