in reply to Turning an argument into a regexp
my $re = /\d+$/; # for an example pattern $thingy =~ /My Zip code is $re/; $thingy =~ /$re/; $thingy =~ s/foo{$re}bar/baz/; etc... [download]
Cheers, KM