in reply to Re: Slurping search-replace patterns from a file
in thread RESOLVED: Slurping search-replace patterns from a file
Because your input file appears to contain perl code, I suspect you can get by with eval:
Unfortunately, it's not quite that simple. I provided an overly simplified example - it's usually not that clean. This is more along the lines of what my file looks like:
replace { (foo) and stuff } with { bar $1 }
Which will be programmatically consolidated to:
s/(foo) and stuff/bar $1/I'd like to avoid debating the format, which is why I provided the simplified example.
All the same, thanks for pointing out that an eval would work in the original situation.
-HKS
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Slurping search-replace patterns from a file
by jettero (Monsignor) on Oct 14, 2008 at 16:43 UTC |