in reply to File::Find::Closures... help

Did you read the warning message? It talks about line 24. Which, in your code, is the following fragment:

@sorted_large_files = sort { -s "$_/$b" <=> -s "$_/$a" } @large_files;

Now, looking at this, there are three variables explicitly mentioned, $a, $b and $_. Looking at the documentation of sort, I find that $a and $b are set and used by the sort() function. Which leaves $_. This could be undefined. Maybe it would be a good idea to investigate the value of $_ and compare that with your expectations.

It's no real surprise that this works if there is only a single file, because then, the comparison block will never be called, BTW.

Replies are listed 'Best First'.
Re^2: File::Find::Closures... help
by mikejones (Scribe) on Dec 15, 2007 at 23:40 UTC
    Thank you. I fixed it. I had been working on this for just about an hour, and became tired.