Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: how to read conf file in perl script

by ph0enix (Friar)
on Oct 20, 2009 at 08:15 UTC ( [id://802163]=note: print w/replies, xml ) Need Help??


in reply to Re^2: how to read conf file in perl script
in thread how to read conf file in perl script

Cange your config file to a module - eg.
package MyApp::Config; our $a = 1000; our $b = "test"; our $c = 2000; our $d = "test2"; 1;
Then you can load it with use MyApp::Config; and access variables in following way $MyApp::Config::c.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-06-24 19:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.