in reply to Re^2: variables in substition/eval
in thread variables in substition/eval
My intention was to show the use of the 'r' modifier to resolve the problem. Because 'r' may have appeared to replace 'g', I commented on that also.
Not commenting on other aspects of the code should not be construed as tacit approval. I still don't know what output was expected; I don't know the context of this code; and there are other unknowns, such as how "scrooge" relates to the anything here.
There are in fact all sorts of issues with the code, ranging from poorly named variables (e.g. @list) to bad grammar (e.g. non-capitalised proper nouns).
I possibly would have used an easily identifiable placeholder such that the regex required no captures or lookaround assertions. The substitution may simply have been something like:
... s/__NEPHEW__/$nephew/r ...
Update: Did Donald Duck have a relative named Scrooge? Perhaps that explains the "scrooge" connection. Still just guessing. :-)
— Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: variables in substition/eval
by AnomalousMonk (Archbishop) on Aug 19, 2017 at 14:02 UTC | |
by kcott (Archbishop) on Aug 20, 2017 at 06:14 UTC |