in reply to Bad evalled substitution pattern

The line

$content .= $_;

is not the line where the error is, but the line above it. The second slash is missing here:

s/\$ERROR{'([\w]+)'}/g;