There's more than one way to do things | |
PerlMonks |
Re: Re: Accessing the __DATA__ blocks of other packagesby caedes (Pilgrim) |
on Dec 11, 2002 at 22:24 UTC ( [id://219199]=note: print w/replies, xml ) | Need Help?? |
While I don't doubt that your code works, I think you might have misunderstood me. To make your example like my problem, the package Foo would have a subroutine with the while(<main::DATA>), and the main script would have the __DATA__ token.
This is really too simplified though because Foo doesn't know what it's caller is ahead of time (it's not always main). -caedes
In Section
Seekers of Perl Wisdom
|
|