Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: conf file in Perl syntax

by si_lence (Deacon)
on Jun 11, 2009 at 09:01 UTC ( #770568=note: print w/ replies, xml ) Need Help??


in reply to conf file in Perl syntax

If - for some reason - you do not want to use the suggested config::inifiles module, or just want to know how to access the contents of a hash, you can use the "each" function.

while (my ($host,$ip) = each(%$config)) { print "$host => $ip\n"; }
be aware that $config contains a reference to a hash.

cheers si_lence


Comment on Re: conf file in Perl syntax
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2015-07-06 00:19 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 (68 votes), past polls