in reply to Regex Tuning /(?:(?:foo[34])|(?:bar[12]))\.txt/io
it's easier to read and to maintain, and I am sure you will not notice any speed lost, specially if you are going to access the files after it.foreach (@files) { process_file $_ if (/foo[34]\.txt$/i or /bar[12]\.txt$/i) }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |