McDarren has asked for the wisdom of the Perl Monks concerning the following question:
However, I'm scratching my head over the best way to handle the multiplier.$line =~ s/<:KEYWORD:>/$value/;
where the replacement is evaluated on the fly.$line =~ s/<:KEYWORD:(.*):>/$value * $1/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Evaluating a regex replacement value
by prasadbabu (Prior) on Oct 05, 2005 at 11:59 UTC | |
by McDarren (Abbot) on Oct 05, 2005 at 12:51 UTC | |
|
Re: Evaluating a regex replacement value
by Samy_rio (Vicar) on Oct 05, 2005 at 12:08 UTC | |
by davidrw (Prior) on Oct 05, 2005 at 13:02 UTC | |
by McDarren (Abbot) on Oct 05, 2005 at 14:09 UTC | |
|
Re: Evaluating a regex replacement value
by davidrw (Prior) on Oct 05, 2005 at 13:11 UTC | |
|
Re: Evaluating a regex replacement value
by Tanktalus (Canon) on Oct 05, 2005 at 16:53 UTC | |
|
Re: Evaluating a regex replacement value
by liverpole (Monsignor) on Oct 05, 2005 at 14:33 UTC | |
by McDarren (Abbot) on Oct 05, 2005 at 14:49 UTC |