in reply to Sorting based on filesize.

Here's an example to get you started:

my @files = glob("*"); my @sorted = sort { -s $a <=> -s $b } @files;