![]() |
|
"be consistent" | |
PerlMonks |
Re: Re: Readingby mkmcconn (Chaplain) |
on Feb 06, 2001 at 05:11 UTC ( #56576=note: print w/replies, xml ) | Need Help?? |
opendir DIR,$dir || die "Couldn't open '$dir': $!";
For the main point of your code, I think it's excellent
the way that you've used sort() on stat() . To use the perlop '||' with opendir() the parentheses are not optional. Otherwise, use or which is more reliable in statements such as open() and opendir() , because the precedence of or is so low that it doesn't even require those pesky parentheses. (deleted my own bad -here) But, as I said, this is a small tweak that shouldn't take away from what seems to me otherwise to be a good idea. mkmcconn
In Section
Seekers of Perl Wisdom
|
|