You didn't say what you wanted to optimize, so here's another take on it:
Note that this only works on modern perls.my @filenames = do { opendir my $d, "." or die; sort readdir $d };
In reply to Re: how to do effective sort in perl
by duff
in thread how to do effective sort in perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |