in reply to Re: regexp $1 in a variable
in thread regexp $1 in a variable

Maybe this looks a bit cleaner :-)
... $c='"a$1"'; ... $a =~ s/$b/$c/eeg ; ...