Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How ti include a file in Perl script

by siva kumar (Pilgrim)
on Jan 10, 2008 at 11:11 UTC ( [id://661600]=note: print w/replies, xml ) Need Help??


in reply to How ti include a file in Perl script

You can use Config::Simple since the parameters you have given seems like configuration items,
have Globalconf.conf as below
[ConnectionSettings] Server_name = "server"; User_name = "user"; Password = "password"; [ExeFiles] Srvr_mngr = 'C:\Siebel\WebClient\Bin\srvrmgr.exe'; List_of_Values = 'C:\Siebel\WebClient\Bin\LOV.bat'; [Others] Row_id = "Session id";
In main program
use Config::Simple; my $Config = {}; Config::Simple->import_from("Globalconf.conf",$Config); print $Config->{"ConnectionSettings.Server_name"}; print $Config->{"ConnectionSettings.Password"}; print $Config->{"Others.Row_id"};
Output:
server password Session id

Log In?
Username:
Password:

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

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

    No recent polls found