|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re: multiple __DATA__ && __END__by davido (Cardinal) |
| on Nov 20, 2003 at 18:54 UTC ( [id://308762]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
tell and seek may be used to jump around in the single __DATA__ section, allowing pretty flexible access. But let me mention something else.
I know this isn't exactly what you're asking. But there are instances where it might be just as appropriate, and somewhat simpler to use one or more HERE documents instead of the <DATA> filehandle. ...just a thought... there's always more than one way to do it. ;) A HERE doc will be equivilant to slurping an entire file into a scalar. But maybe that's not so bad in some situations. And with multiple HERE docs, the possibilities open up.
Dave "If I had my life to live over again, I'd be a plumber." -- Albert Einstein
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||