in reply to Is too little too much? Coding under the microscope...
In theory, the fewer lines of code you have, the less bugs. You might want to move sort to the right side of the assignment in the short version, though. :)
I'd probably throw a \z anchor at the end of the grep regex, too.opendir(LOGS, '.') or die "Can't open directory: $!"; print join("\n", sort map { -M $_ } grep { /\.log/ } readdir(DIR)); closedir(LOGS);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Is too little too much? Coding under the microscope...
by snafu (Chaplain) on Jun 28, 2001 at 09:52 UTC |