We don't bite newbies here... much | |
PerlMonks |
= for lists and hashes?by skazat (Chaplain) |
on Mar 20, 2002 at 20:42 UTC ( [id://153127]=perlquestion: print w/replies, xml ) | Need Help?? |
skazat has asked for the wisdom of the Perl Monks concerning the following question: Yo yo yo yo yo! I have a config module with all sorts of nice variables and hashes and arrays. Now, we've created a way to override stuff in the default config module by eval'ing a file that can contain some of the same variables in the config module. This file is evaled at the top of the module and everything below looks like this:
This works fine and dandy until I hit a hash or an array, and then I get a polite error, such as:
Which just makes me all frowny. Is there an easy way to have the same sort of functionality that I have with ||= and variables for hashes and arrays? I understand that ||= may work differently within a list context, but I don't know what to use in its place. thanks for the wisdom, -justin simoni
Back to
Seekers of Perl Wisdom
|
|