Hi guys (gals implicitly included),
I am a quick question that I have been unable to find an answer to via google or the cookbook.
I am using Config::Auto which appears to return a reference to an anonymous hash.
my $SETS = Config::Auto::parse( '/path/file.conf' );
print Dumper( $SETS );
$VAR = {
'entryA' => { anonymous hash }
'entryB' => { anonymous hash }
};
I want to modify this to read multiple config files as follows:
my @files = </path/to/files/*>;
my $SETS = Config::Auto::parse( $_ ) foreach @files;
Obviously only the last entry ends up in $SETS. Is there an elegant way to achieve the above. There seems to be plenty of documentation on how to achieve this for hashes, arrays, or even arrays of references but just not the above. (It is also quite possible that I do not really understand what exactly I am dealing with as I am not really a programmer.)
Any help would be greatly appreciated.
Cheers,
Patrick
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.