You don't need to. I used qw just for making the example. Perhaps I should've written it like this:
#!/usr/bin/perl use strict; use warnings; my $r = "ab+c*d"; my $rRegex = qr/$r/; while (my $t = <DATA>) { if ($t =~ $rRegex) { print "MATCH: $t\n"; } } __DATA__ abcd aabbbd acccd dbca
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re^3: Find Replace text with list
by roboticus
in thread Find Replace text with list
by wa2nlinux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |