#finding the newest .zip file in the directory my $zipFile = reduce {(stat $a)[10] > (stat $b)[10] ? $a : $b} glob Fi +le::Spec->catfile($dir, '*.zip');