Perhaps there are no files in the directory where you tried you second snippet?
Try this in any *nix box:
perl -e 'my $lf = (sort(</bin/*>))[-1];print $lf'
In reply to Re: What's the difference between stat and sort?
by Anonymous Monk
in thread What's the difference between stat and sort?
by PetaMem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |