Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Better way to read "configuration" files

by ctilmes (Vicar)
on Mar 04, 2003 at 14:13 UTC ( [id://240348]=note: print w/replies, xml ) Need Help??


in reply to Better way to read "configuration" files

Other suggestions are good. My new favorite is YAML. If you haven't seen it, be sure to check out http://yaml.org/.
use YAML; my @pwlist = Load(join '', <DATA>); # Print as perl structure use Data::Dumper; print Dumper(\@pwlist); __DATA__ # comments ignored user: test passwd: prrft5142 --- user: fred passwd: fredpw
Output:
$VAR1 = [ { 'passwd' => 'prrft5142', 'user' => 'test' }, { 'passwd' => 'fredpw', 'user' => 'fred' } ];

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2024-04-23 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found