B
bennett
Suppose I want to print multiple lines of output which contain dollar
signs. The following will not work:
print <<EOF ;
A loaf of bread costs $1.
A jug of milk costs $2.
EOF
because Perl will interpret the dollar signs. How can I print it
without having to put a backslash in front of every $ sign?
For example, I want to write a Perl script that prints out another Perl
script as output, I don't want to have to write the second Perl script
once using dollar signs and other special characters, then go back and
insert backslashes in front of every special character.
signs. The following will not work:
print <<EOF ;
A loaf of bread costs $1.
A jug of milk costs $2.
EOF
because Perl will interpret the dollar signs. How can I print it
without having to put a backslash in front of every $ sign?
For example, I want to write a Perl script that prints out another Perl
script as output, I don't want to have to write the second Perl script
once using dollar signs and other special characters, then go back and
insert backslashes in front of every special character.