It depends a great deal on the data you need and how much of it there actually is. If 'some hundreds' is about 300 then almost any module that can be used for configuration and that suits your data criteria will turn the trick. If you need a lot more than that and your data is simple then a hand rolled solution may be what you need. Consider the following simple benchmark:

use warnings; use strict; use Benchmark qw(timethese cmpthese); use YAML qw(); use XML::Simple qw(); use Config::Fast qw(); my %bigHash = map {$_ => genStr ($_)} genKeys (1 .. 300); YAML::DumpFile ("delme.yaml", \%bigHash); open my $out, '>', "delme.xml" or die "Can't create demle.xml: $!\n"; print $out XML::Simple::XMLout (\%bigHash); close $out; open $out, '>', "delme.fast" or die "Can't create delme.fast: $!\n"; print $out "$_ $bigHash{$_}\n" for keys %bigHash; close $out; my $yamlHash = YAML::LoadFile ("delme.cfg"); my $fastHash = Config::Fast::fastconfig ("delme.fast"); my $xmlHash = XML::Simple::XMLin ("delme.xml"); my $slurpHash = {do {local @ARGV = "delme.fast"; my %newHash = map {sp +lit ' ', $_, 2} <>;}}; cmpthese (-1, { YAML => sub {my $newHash = YAML::LoadFile ("delme.cfg");}, fast => sub {my $newHash = Config::Fast::fastconfig ("delme.fast") +;}, XML => sub {my $newHash = XML::Simple::XMLin ("delme.xml");}, slurp => sub {local @ARGV = "delme.fast"; my %newHash = map {split + ' ', $_, 2} <>;} } ); sub genKeys { my @keys; for my $seed (@_) { push @keys, "x$seed"; } return @keys; } sub genStr { my ($key) = @_; return "Str " . ('x' x (substr ($key, 1) % 100)); }

Prints:

Rate YAML XML fast slurp YAML 21.0/s -- -8% -53% -98% XML 22.8/s 8% -- -50% -98% fast 45.2/s 115% 98% -- -96% slurp 1211/s 5665% 5216% 2583% --

True laziness is hard work

In reply to Re: fastest file processing Config file format by GrandFather
in thread fastest file processing Config file format by Davewhite

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.