[Chicago-talk] How would I do this

Jay Strauss me at heyjay.com
Sat Mar 25 14:01:51 PST 2006


On Saturday 25 March 2006 3:25 pm, JT Smith wrote:
> I don't know, but I'd say it's expecting a reference from the FileHandle
> object.
>
> my $fh = FileHandle->new;
> $fh->open("< $file");
>
> my %config = ParseConfig(-ConfigFile=>\$file);
>
> You may also be able to do it like this using a traditional file handle:
>
> my %config = ParseConfig(-ConfigFile=>\*FILE);

that worked, doing it like:

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

__DATA__
key value

Thanks
Jay


More information about the Chicago-talk mailing list