in reply to Literal "$"
Or, simply use single-quotes, and don't use a back-slash:print "A sample dollar amount: \$12.34\n";
Or use the q// quoting operator, which works like single-quotes:print 'Another dollar amount: $56.78', "\n";
There's a whole section in the perlop man page titled "Quote and Quote-like operators." That's something you'll want to read.print q/Yet another amount: $90.12/, "\n";
|
|---|