|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
To remark a statment.
We use # But I am just curious if there is /* All lines are remarked until a delimiter is found. */ As in the Java way. It helps a lot in debugging. Currently, I either have to add # to every line. Or add sub falsefunction() { } to the top and bottom and then cut them out and paste them below but it is rather stupid to do that. So is there a better way to remark multiple lines? |
|
#2
|
|||
|
|||
|
There isn't 'officially' a multiline comment as in Java. However, you can kludge it by making the interpreter think that what follows is POD documentation (imagine the following as equivalent to in Java putting /** */ around everything rather than /* */). Before the block you want commented, put:
=pod (first chars on a newline) and after the block you want commented, again as first chars on a newline, put =cut That should do the trick for you. Alternatively, if you can find an editor that 'understands' Perl (e.g. emacs, or on Windows something like UltraEdit or EditPlus) you can get it to comment out a block by selecting a block and telling it to comment out, or insert a certain character at the start of every line (a # in this case), or whatever other way you can persuade it to do commenting. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Remark statements |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|