Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: Using Data::Dumper to dump an array of hashes to a file

by alexm (Chaplain)
on Aug 15, 2008 at 07:47 UTC ( [id://704485]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Using Data::Dumper to dump an array of hashes to a file
in thread Using Data::Dumper to dump an array of hashes to a file

I wouldn't use require because it would decline to load the same file twice (unless you monkey with %INC). Also, I don't know if it would return the value returned by the file (I think it doesn't).

It actually does :)

I've been using require for a while to read simple config files: it does syntax error checking and the fact that it only loads once was not a big deal. However, I agree that YAML (or Config::IniFiles et al.) are safer and should be preferred.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2026-01-18 08:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (121 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.