just add the /e modifier. $string =~ s/$search/$parts[2]/e; Update:
As for the $1 being pulled as a literal string, more info is needed. Could be you're trying to use it like this: s/(.{60})/$1/g which works fine..
if you need it in the same expression use a back reference \1:
perlretut: /\b(\w\w\w)\s\1\b/; Update: Miss understood what you were trying to do, recently had to get a sub routine call in a s/// sorry.
John
Comment on Re: Slurping search-replace patterns from a file