'The guy''s house' is "The guy's house" in perl (well, you could write 'The guy\'s house', too..) "He said ""Hello""" is "He said \"Hello\"" in perl (or, 'He said "Hello"') #### #i assume here that you define $comment somewhere else.. $comment =~ s/"/""/g; # if you use double-quotes # OR: $comment =~ s/'/''/g; # is you use single-quotes