kwokna has asked for the wisdom of the Perl Monks concerning the following question:
Input: perl test.pl how(\d)=on why$1=offmy ($reg, $reg2) = @ARGV; my $string = "how1=on&how2=on"; $string =~ s/$reg/$reg2/eg; print $string;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with Regexp substitution using variables
by ikegami (Patriarch) on Jan 20, 2005 at 02:48 UTC | |
by Roy Johnson (Monsignor) on Jan 20, 2005 at 17:41 UTC | |
by ikegami (Patriarch) on Jan 20, 2005 at 19:26 UTC | |
|
Re: Help with Regexp substitution using variables
by Ardemus (Beadle) on Jan 20, 2005 at 04:13 UTC | |
by kwokna (Initiate) on Jan 20, 2005 at 17:02 UTC | |
|
Re: Help with Regexp substitution using variables
by dave_the_m (Monsignor) on Jan 20, 2005 at 02:50 UTC |