Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Answer: How do I print a quotation-mark?

by toolic (Bishop)
on Aug 19, 2009 at 17:27 UTC ( #789882=categorized answer: print w/replies, xml ) Need Help??

Q&A > strings > How do I print a quotation-mark? - Answer contributed by toolic

If you just need a quote character all by itself, you can make one using the chr function: Use the ASCII code for the double quote character ("). With chr:
print chr(34); my $quot = chr(34); print "This is ${quot}not$quot a quote.\n";

Use the octal or hexadecimal escape code:

print "\042"; print "\x22";

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2016-12-04 19:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (69 votes). Check out past polls.