in reply to Re^2: Sorting based on filesize.
in thread Sorting based on filesize.

Good point. This fixes it:

@files = grep { -f } glob '* .*'; @hash{ (map { (-s $_) . ".$_"} @files) } = @files; @files = @hash{ sort { $a <=> $b } keys %hash }; print map {$_,$/} @files;
but it's rather a moot point - the Schwartzian Transform goes a step further and eliminates the hash.