Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: parsing arguments

by zakzebrowski (Curate)
on Oct 08, 2003 at 01:16 UTC ( [id://297443]=note: print w/replies, xml ) Need Help??


in reply to Re: parsing arguments
in thread parsing arguments

I was going to suggest Config::IniFiles myself...
use Config::IniFiles; my $config = Config::IniFiles->new(file=>'asdf.ini'); my $someParam = $config->val('section','param');
where asdf.config would look like
[section] param=value


----
Zak
undef$/;$mmm="J\nutsu\nutss\nuts\nutst\nuts A\nutsn\nutso\nutst\nutsh\ +nutse\nutsr\nuts P\nutse\nutsr\nutsl\nuts H\nutsa\nutsc\nutsk\nutse\n +utsr\nuts";open($DOH,"<",\$mmm);$_=$forbbiden=<$DOH>;s/\nuts//g;print +;

Replies are listed 'Best First'.
Re: parsing arguments
by b10m (Vicar) on Oct 08, 2003 at 11:19 UTC

    I'm not too familiar with Config::Inifiles, but from your example, it doesn't seem to fit mifflin's needs, since (s)he wants to parse command line arguments, and Config::Inifiles works with, *tada* Inifiles :-)

    Since the Getopt::Long was already mentioned, I'd like to add "AppConfig". I have been using that myself recently and must say it works nice. It parses command line arguments, aswell as configuration files.

    --
    B10m

    Edit: English can be hard sometimes :-(
      Indeed, you are correct. However, in the spirit of "there's more than one way to do it", I provided the link to the module... Cheers


      ----
      Zak
      undef$/;$mmm="J\nutsu\nutss\nuts\nutst\nuts A\nutsn\nutso\nutst\nutsh\ +nutse\nutsr\nuts P\nutse\nutsr\nutsl\nuts H\nutsa\nutsc\nutsk\nutse\n +utsr\nuts";open($DOH,"<",\$mmm);$_=$forbbiden=<$DOH>;s/\nuts//g;print +;
        Thanks for posting your reply on Config::IniFiles. Although it did not solve the problem I was having in thread I have installed in my system and have started using it. I love it! Thanks again.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-25 09:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found