poj#!perl; use strict; use Config::Simple; my %Config=(); Config::Simple->import_from('new.conf', \%Config) or die Config::Simple->error(); my %hash=(); for my $key (keys %Config){ my ($sect,$para) = split /\./,$key; $hash{$sect}{$para} = $Config{$key}; } for my $sect (sort keys %hash){ print "section : $sect\n"; for my $para (sort keys %{$hash{$sect}}){ print "$sect.$para : ".$hash{$sect}{$para}."\n"; } }
In reply to Re: perl: Config::Simple config file reading
by poj
in thread perl: Config::Simple config file reading
by abhi1390
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |