print <<'EndOfText'; Hello! my name is "Bob". This is an old\new text. EndOfText #### $str = 'user input'; $str =~ s/^$/ /gm; # add a space to each blank line print <<"EndOfGeneratedCode"; print <<''; $str EndOfGeneratedCode