Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: How to use __DATA__ efficiently, help!

by Anonyrnous Monk (Hermit)
on Feb 10, 2011 at 17:32 UTC ( #887504=note: print w/ replies, xml ) Need Help??


in reply to Re^4: How to use __DATA__ efficiently, help!
in thread How to use __DATA__ efficiently, help!

but you're wrong in saying that __DATA__ can't be accessed twice

This is not what I said.  I said that you can only have one __DATA__ section (per package/file), not that you can only read it once.

The OP asked "how to use multiple sets of __DATA__", which I understood to mean something like this (also see the OP's sample code)

#!/usr/bin/perl while (<DATA>) { print } __DATA__ set 1 ... __DATA__ set 2 ...

which obviously acts as only one DATA section:

$ ./887252.pl set 1 ... __DATA__ set 2 ...


Comment on Re^5: How to use __DATA__ efficiently, help!
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://887504]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2015-07-30 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls