[Chicago-talk] How would I do this

Jay Strauss me at heyjay.com
Sat Mar 25 13:06:51 PST 2006

I'm trying to get Config::General to read my __DATA__ section.  But I don't 
know how to make it read it.  The docs say it can read a filehandle, but I 
don't know how to turn <DATA> into $filehandle.  I've been trying all 
different combinations like:

my %config = ParseConfig(-ConfigFile => \DATA);
my %config = ParseConfig(-ConfigFile => \<DATA>);
my %config = ParseConfig(-ConfigFile => DATA);

But don't know how to do it.

An example of how to do it would be tremendous


use Config::General;

my %config = ParseConfig(-ConfigFile => \DATA);

use Data::Dumper;
print Dumper(%config);


somekey somevalue

More information about the Chicago-talk mailing list