Yes, I absolutely agree and that's why I included the link to "How do I post a question effectively?" (for any follow-up questions) as it recommends posting:
"... a minimal script that reproduces your problem ..." [original emphasis]
The main thrust of my first paragraph was to highlight the fact that the error message didn't marry up with the posted code and my following comments were very much guesses.
I have just noticed that the second version of the OP's code (Re^2: Help w/ regex in filename) has about 40 lines but the error message shows "at script.pl line 112". There's clearly something else going on there that we're not privy to: maybe that's script.pl and the OP is removing part of it; maybe script.pl is a completely different piece of code that's requiring the posted code; maybe it's neither of those.
-- Ken
In reply to Re^3: Help w/ regex in filename
by kcott
in thread Help w/ regex in filename
by dcthehole
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |