in reply to This is why Perl is so frustrating
A more concise and (possibly) clearer way to code the test is:
for my $file (@filenames) { next if $file =~ /^\.\.?$/; ... }
note too the early 'exit' from the current loop iteration to avoid a level of nesting and make flow clearer.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: This is why Perl is so frustrating
by JadeNB (Chaplain) on Jul 29, 2009 at 23:36 UTC |