Actually, i checked in perlsyn.  It uses a couple of them in examples at the
very end, but doesn't really talk about them.

I frequently use the __END__ tag while i'm debugging so that i can easily
"comment out" a chunk of code at the end.  I'm also using the __DATA__ tag,
and i was worried that the __END__ tag might stop perl from reading the file
at all, in which case i wouldn't get to the __DATA__.  I tried it, though,
and it seems to work.

I don't suppose there's a __BEGIN__ tag, which would allow one to do this:

#!/usr/bin/perl
__DATA__
blah
blah
blah
__BEGIN__
print while <DATA>;

... ?

-----Original Message-----
From: Jeff 'japhy/Marillion' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 11:22 AM
To: Mooney Christophe-CMOONEY1
Cc: [EMAIL PROTECTED]
Subject: Re: __TAGS__


On Jul 26, Mooney Christophe-CMOONEY1 said:

>Where can i find out more information about the __TAGS__ ?
>
>BTW what are they really called?  Are they directives?

These are documented in perlsyn:

  __END__
    end of program

  __DATA__
    end of program, but allow this to be accessed via *PKG::DATA

  __FILE__
    the name of the current file

  __LINE__
    the number of the current line

There are also __WARN__ and __DIE__, but they're just special keys in the
%SIG hash.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter.         Brother #734
**      Manning Publications, Co, is publishing my Perl Regex book      **

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to