I'm not sure what I'm doing wrong here, but, I can't seem to populate %config from the config file that I have created. This obviously isn't the entire program, but it represents the piece that I'm having issues with. TIA!

Here's a snippet of code and the config file data:

#!/usr/local/bin/perl -w use strict; use Data::Dumper; use Mozilla::LDAP::Conn; use Mozilla::LDAP::Utils; use Config::General; my @path = qw(/usr/lib/perl /export/home/bills/); my $rcfile = "/export/home/bills/acct.cfg"; my $conf = new Config::General(-ConfigFile => "acct.cfg", -ConfigPath +=> \@path); my %config = $conf->getall(); $conf->save_file("new"); print Dumper(\%config); exit;
The config file data:
<user jsearle> <server psdbsrv1> why lastLogin Never logged in approved exp shell email_1_date email_2_date </server> <server psdev1> why lastLogin Never logged in approved exp shell email_1_date email_2_date </server> <server psbeta1> why lastLogin Never logged in approved exp shell email_1_date email_2_date </server> <server orafinalpha1> why lastLogin Never logged in approved exp shell email_1_date email_2_date </server> </user>

In reply to Help with Config::General by blink

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.