Re: Multiline comment in Perl

2008-05-22 Thread Dr.Ruud
"Dr.Ruud" schreef: > Paul Johnson: >> sub half >> { >> my ($val) = @_; >> $val / 2; >> q/ >> Returns $val divided by 2 >> /; >> } > > Variant: > > sub half { > return unless defined $_[0]; > return $_[0] / 2; > > q

Re: Multiline comment in Perl

2008-05-21 Thread Octavian Rasnita
From: "Dr.Ruud" <[EMAIL PROTECTED]> Variant: sub half { return unless defined $_[0]; return $_[0] / 2; q/* Returns $val divided by 2 */ } q/* This is a multi- line comment. */ if 0; -- Affijn, Ruud Another va

Re: Multiline comment in Perl

2008-05-21 Thread Dr.Ruud
Paul Johnson schreef: > sub half > { > my ($val) = @_; > $val / 2; > q/ > Returns $val divided by 2 > /; > } Variant: sub half { return unless defined $_[0]; return $_[0] / 2; q/* Returns

Re: Multiline comment in Perl

2008-05-21 Thread Joshua Hoblitt
On Tue, May 20, 2008 at 07:40:38PM -0400, Robert Hicks wrote: > Cheating...but: > > http://search.cpan.org/~kane/Acme-Comment-1.02/lib/Acme/Comment.pm and dangerous as it's implemented with source filters which can have some "interesting" interactions. -J -- -- To unsubscribe, e-mail: [EMAIL

Re: Multiline comment in Perl

2008-05-21 Thread Paul Johnson
On Mon, May 19, 2008 at 08:42:49PM +0300, Octavian Rasnita wrote: > By the way, what do you think about the following commenting style: > > q/ > the > commented > lines > /; > > It is a valid perl code, and it only gives a warning if "use warnings" is > used, but it is not a problem because we kno

Re: Multiline comment in Perl

2008-05-20 Thread Octavian Rasnita
From: "Robert Hicks" <[EMAIL PROTECTED]> Cheating...but: http://search.cpan.org/~kane/Acme-Comment-1.02/lib/Acme/Comment.pm This module works fine. And it takes little code to just write use Acme::Comment; then use the C comment style. I've seen that the multiline comments can also contain ot

Re: Multiline comment in Perl

2008-05-20 Thread Robert Hicks
sivasakthi wrote: Hi all, How to comment Multiple lines in Perl? Thanks, Siva Cheating...but: http://search.cpan.org/~kane/Acme-Comment-1.02/lib/Acme/Comment.pm Robert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.o

Re: Multiline comment in Perl

2008-05-19 Thread Octavian Rasnita
From: "Rob Dixon" <[EMAIL PROTECTED]> Yes, I'm afraid I misquoted the entry from perlfaq7, which actually recommends =begin comment : =end comment =cut which is clumsy, to say the least. However I use =begin comment : =cut which works fine, and I don't think contravenes POD syntax except t

Re: Multiline comment in Perl

2008-05-19 Thread Rob Dixon
Octavian Rasnita wrote: > > From: "Rob Dixon" <[EMAIL PROTECTED]> >> >> The documentation that John referred you to recommends >> >> =begin comment >>: >> =end >> >> Which may be a trifle awkward, but I'm sure there are worse things that >> happen >> to you in your day. It takes less than a

Re: Multiline comment in Perl

2008-05-19 Thread Aruna Goke
Octavian Rasnita wrote: From: "Rob Dixon" <[EMAIL PROTECTED]> The documentation that John referred you to recommends =begin comment : =end Which may be a trifle awkward, but I'm sure there are worse things that happen to you in your day. It takes less than a second to type, and if you do

Re: Multiline comment in Perl

2008-05-19 Thread Octavian Rasnita
From: "Rob Dixon" <[EMAIL PROTECTED]> The documentation that John referred you to recommends =begin comment : =end Which may be a trifle awkward, but I'm sure there are worse things that happen to you in your day. It takes less than a second to type, and if you do it a lot you could set

Re: Multiline comment in Perl

2008-05-18 Thread Rob Dixon
Octavian Rasnita wrote: > > From: "Rob Dixon" <[EMAIL PROTECTED]> >> >> (Once again, please bottom-post replies to this group. It maintains >> readability for extended threads. Salutations and signatures should always >> be edited out. You are responsible for the whole of your post, not just >> yo

Re: Multiline comment in Perl

2008-05-16 Thread Octavian Rasnita
From: "Rob Dixon" <[EMAIL PROTECTED]> (Once again, please bottom-post replies to this group. It maintains readability for extended threads. Salutations and signatures should always be edited out. You are responsible for the whole of your post, not just your own material.) Maybe it improves th

Re: Multiline comment in Perl

2008-05-16 Thread Rob Dixon
Octavian Rasnita wrote: > > From: "John W. Krahn" <[EMAIL PROTECTED]> > >> Octavian Rasnita wrote: >> >>> - Original Message - From: "sivasakthi" <[EMAIL PROTECTED]> >>> How to comment Multiple lines in Perl? >>> >>> Perl doesn't have a multiline comment mark. >>> >>> You can use pe

Re: Multiline comment in Perl

2008-05-16 Thread Octavian Rasnita
; <[EMAIL PROTECTED]> To: "Perl Beginners" Sent: Friday, May 16, 2008 7:53 PM Subject: Re: Multiline comment in Perl Octavian Rasnita wrote: - Original Message - From: "sivasakthi" <[EMAIL PROTECTED]> How to comment Multiple lines in Perl? Perl do

Re: Multiline comment in Perl

2008-05-16 Thread John W. Krahn
Octavian Rasnita wrote: - Original Message - From: "sivasakthi" <[EMAIL PROTECTED]> How to comment Multiple lines in Perl? Perl doesn't have a multiline comment mark. You can use perldoc marks in order to comment what you want, or include the content in a string, like: Perldoc s

Re: Multiline comment in Perl

2008-05-16 Thread John W. Krahn
Beau E. Cox wrote: On Thu, May 15, 2008 at 11:24 PM, sivasakthi <[EMAIL PROTECTED]> wrote: How to comment Multiple lines in Perl? =comment like this example =cut $ echo " =comment like this example =cut " | podchecker *** ERROR: Unknown command 'comment' at line 3 in file <&STDIN does n

Re: Multiline comment in Perl

2008-05-16 Thread John W. Krahn
sivasakthi wrote: Hi all, Hello, How to comment Multiple lines in Perl? perldoc -q "How can I comment out a large block of perl code" John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order.

Re: Multiline comment in Perl

2008-05-16 Thread Octavian Rasnita
more lines using the same syntax. Octavian - Original Message - From: "sivasakthi" <[EMAIL PROTECTED]> To: "beginners perl" Sent: Friday, May 16, 2008 12:24 PM Subject: Multiline comment in Perl Hi all, How to comment Multiple lines in Perl? Thanks,

Re: Multiline comment in Perl

2008-05-16 Thread Beau E. Cox
On Thu, May 15, 2008 at 11:24 PM, sivasakthi <[EMAIL PROTECTED]> wrote: > Hi all, > > > How to comment Multiple lines in Perl? > > > > Thanks, > Siva > =comment like this example =cut Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Multiline comment in Perl

2008-05-16 Thread sivasakthi
Hi all, How to comment Multiple lines in Perl? Thanks, Siva