| Home >> perlexamples >> Parsing config file made easy ... #!/usr/bin/perl
# the OOP way
use Config::General;
$conf = new Config::General("rcfile");
my %config = $conf->getall;
#
# the procedural way
use Config::General qw(ParseConfig);
my %config = ParseConfig("rcfile");You can use module to parse config file!
Perl functions
|
handling Errors in perl How to include module in perl? number of matches in regex Perl Data Dumper
|