- or download this
$regex = qr/$pattern/;
$string =~ /foo${regex}bar/; # interpolate into larger patterns
- or download this
my $re = qr!yes|no!;
my $re2 = qr!\sthankyou!;
my $bigre = $re.$re2;
print "polite yes or no\n" if "yes thankyou" =~ $bigre;
- or download this
my $bigre = qr!yes|no!.qr!\sthankyou!;