Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • In my experience, YAML is a read-only format. It's probably just that I haven't used it enough but every time I try to hand craft YAML I get bitten by the subtleties.

    I had a brief flirtation with XML and a config file format some years ago and I still paying the price :-)

    I've used hand-rolled parser code for ini-style configs a number of times recently. I haven't bothered with implementing [sections] but often need to include multi-value items. The way I tend to handle that is by putting an '@' prefix on the key name in the ini file - causing it to be parsed into an array.

    • Sounds like reinventing the wheel to me : Config::Tiny and Config::Simple (look no dependancies (http://cpandeps.cantrell.org.uk/?module=config%3A%3Asimple&perl=any+version&os= any+OS) are both simple, small and deal with most edge cases so you don't have to.
      --

      @JAPH = qw(Hacker Perl Another Just);
      print reverse @JAPH;