Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Answer: How do I print a quotation-mark?

( #789882=categorized answer: print w/ replies, xml ) Need Help??

Q&A > strings > How do I print a quotation-mark? 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";

Comment on Answer: How do I print a quotation-mark?
Select or Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (17)
As of 2015-07-01 16:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (9 votes), past polls