in reply to Storing Regex Patterns in Scalars
my $regex1 = '(hello)'; my $test = 'hello there'; if ($test =~ /$regex1/) { print "$1\n"; }
It shoudl work just fine. Also, you're looking for qr//. Look for it under quoting operators.
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
|
|---|