http://qs1969.pair.com?node_id=1154458


in reply to Re: Introsepcting the current Perl file via DATA, even w/o DATA?
in thread Introspecting the current Perl file via DATA, even w/o DATA?

> Why do you think so?

Because the filepointer is in sync with the parsing phases of Perl. There is an explicit warning not to read DATA at BEGIN or use phases because the end of file isn't reached yet.

And testing showed that in this cases you can readline the currently processed source line resp. the next one.

Not finding the handle in the main stash doesn't mean it doesn't exist somewhere else (probably hidden somewhere in B )

update

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!