#This works my $s = "This is a test"; my $rex = qr/test/i; print "yep\n" if($s =~ $rex); #How do I do this? $rexSubstitution = qr/test/TEST/i; $s =~ $rexSubstitution;
Can that be done, or do I need to evaluate a string at each match? A little searching tells me to go with the string approach.
/J
In reply to qr and substitution by jplindstrom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |