in reply to Printing Code
In Perl, you can prevent the contents of a string from being interpolated by quoting it with single quotes, or using the q// quote-like operator. See perlop (Quote and Quote-like Operators) and perldata (here-doc).open(FILE, ">test.sh") or die "Couldn't open test.sh."; print FILE <<'EOS'; #!/usr/bin/sh echo 'This is a test' EOS close(FILE); print "File written";
|
|---|