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

Re: What is the easy way to comment out chunk of Perl Code

by jonadab (Parson)
on Nov 19, 2005 at 02:42 UTC ( [id://510017]=note: print w/replies, xml ) Need Help??


in reply to What is the easy way to comment out chunk of Perl Code

You can also use a single-quoted heredoc for this...
<<'WONKYCODE'; print "This code isn't technically "commented out" per se; rather, it is interpreted as a string. However, it won't execute, and because of the single quotes it also won't interpolate. Assuming that the code you treat this way is an entire expression (not part of one), the string will be in void context and so will have no effect, other than to remind you that it's still here with a 'useless use of constant in void context' warning.\n"; WONKYCODE

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-19 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found