... in which case you don't need the substition at all :)
$_ = "master442arb_ba"; $_ =~ /master(.*)arb_ba/; $_ = "m$1a_ba"; print $_; # m442a_ba
(the s/$_/$action/ in your snippet looks for "master442arb_ba" in "master442arb_ba" and replaces this (i.e. itself) with "m442a_ba" — an assignment is shorter...)
In reply to Re^2: Using scalar variables as substitution regular expression
by almut
in thread Using scalar variables as substitution regular expression
by addy7de
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |