Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Question regarding printing Special Characters in perl

by Anonymous Monk
on Jan 05, 2013 at 01:28 UTC ( #1011751=note: print w/ replies, xml ) Need Help??


in reply to Question regarding printing Special Characters in perl

Because quotes are quotes,

print "module( ... ... $display("The time is %d",$time)\n"; ^_OPEN ^_CLOSE ^_OPEN ^_CLOSE

Shortest way to fix it is with alternate delimiter ({} needs to be balanced)

print qq{module( ... ... $display("The time is %d",$time)\n};

interpolation, read about it in perlintro, perlop, and Modern Perl, search for "interpolat", in short, single quotes do not interpolate, http://perldoc.perl.org/perltrap.html#Interpolation-Traps and http://perldoc.perl.org/perlop.html#Quote-and-Quote-like-Operators


Comment on Re: Question regarding printing Special Characters in perl
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011751]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-08-30 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls