Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 29th, 2000, 05:19 PM
Chong_Sun Chong_Sun is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Singapore
Posts: 21 Chong_Sun User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Chong_Sun
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?

Reply With Quote
  #2  
Old August 29th, 2000, 05:28 PM
christucker2 christucker2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 81 christucker2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Remark statements

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap