elwarren has asked for the wisdom of the Perl Monks concerning the following question:
I know I can do it with an if statement and $1, but now that I've started down this path...$var =~ s/WORD\s(\d+)/WORD (2 * $1)/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) Re: regex and multiplication
by Ovid (Cardinal) on Sep 21, 2000 at 20:19 UTC | |
by tye (Sage) on Sep 21, 2000 at 20:27 UTC | |
|
Re: regex and multiplication
by elwarren (Priest) on Sep 21, 2000 at 20:26 UTC |