#!/usr/bin/perl use strict; use warnings; use Benchmark qw(timethis); my @bin = glob("/bin/*"); timethis(-2, { one => 'sort { -s $a <=> -s $b } @bin', two => 'map $_->[0], sort { $a->[1] <=> $b->[1] } map [$_, -s $_], @bin' } );