$result = grep { $_ == 1 } map { $time - $_ >= $amount } map { ( $_->stat )[9] } # e.g i'm interested in this... grep { $_->name =~ /.+\.$suffix$/ } # ...and this io($dir)->all;