in reply to Re: Re: recurse directories and sub-directories
in thread recurse directories and sub-directories
The first two lines to match for the current or parent directory could be rewritten as next if $file =~ /^\.{1,2}$/;.
But it would be better not to, because it is a potential time-bomb waiting to explode. Why do people keep dragging out this broken regexp, when a couple of conditionals will do the trick?
next if $file eq '.' or $file eq '..';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(dkubb) Re: (4) recurse directories and sub-directories (bad code warning)
by dkubb (Deacon) on Oct 12, 2001 at 18:43 UTC |