in reply to Re: Return newest file
in thread Return newest file

Why torture yourself to grab the last element when you can reverse the sort and grab the first? It strikes me as being semantically clearer as well:
$newest = (sort { -M $a <=> -M $b } <*.log>)[0];
Same story with the Schwartz trick.

Of course, TIMTOWTDI :)