You want \Q and \E as indicated on perlre. They're perhaps a little obscure and arcane, but powerful and awesome.
$Title =~ s,^\Q$Artist\E\s*-\s*,,ig;
-Paul
In reply to Re: Make a variable safe for a regex.
by jettero
in thread Make a variable safe for a regex.
by exodist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |