in reply to variable interpolation within a range operator
You're interpolating $input with a value such as '../log.dummy-10-01-06-05.gz' into the pattern m#PROCESSING ../$input#. After the interpolation, that's m#PROCESSING ../../log.dummy-10-01-06-05.gz#. That's different from the working pattern you had before (m#PROCESSING ../log.dummy-10-01-06-05.gz#).
One thing you'll want to do, since you're matching literal strings, is to use quotemeta or \Q in the pattern. As it is, when you interpolate $input, the initial dots in '../log.dummy-10-01-06-05.gz' could match any character (as they normally would in a regexp).
In short, I think you want this:
m#PROCESSING \Q$input#
If I may make a few more suggestions...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: variable interpolation within a range operator
by kri54sub (Initiate) on Feb 28, 2008 at 00:19 UTC |