#!/usr/bin/perl
my $match = qr"some_(\w+)_thing";
my $repl = '"no_$1_stuff"';

my $text = "some_strange_thing";
$text =~ s/$match/$repl/ee;
print "Result: $text\n";