in reply to next if regex matches
The square brackets are unnecessary. next unless $path =~ /\.(log|txt)$/;You could also be a little more parsimonious: next unless $path =~ /\.(?:log|txt)$/;Thus avoiding a (presumably unnecessary) capture to $1.
The square brackets are also what made your post render weird. ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: next if regex matches
by Anonymous Monk on May 14, 2003 at 20:49 UTC | |
|
Re: Re: next if regex matches
by tos (Deacon) on May 15, 2003 at 11:13 UTC | |
by tos (Deacon) on May 15, 2003 at 11:40 UTC |