in reply to Formatting quotes in a String

If I understand your question...

substr($my_string, -1, 1) = "'\"";

Just another Perl hooker - will code for food