Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: __DATA__ used in BEGIN

by GrandFather (Saint)
on Nov 06, 2007 at 20:42 UTC ( [id://649336]=note: print w/replies, xml ) Need Help??


in reply to Re^2: __DATA__ used in BEGIN
in thread __DATA__ used in BEGIN

Why can you not just:

my %hugeHash = eval do {local $/; <DATA>}; ... __DATA__ exception1 => 'wibble', ...

to load your hash from the data section? You could make it a whole lot more robust, but if you want quick and dirty that gets you going.


Perl is environmentally friendly - it saves trees

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-03-28 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found