H
Hobo Salesman
I'm using Config::General, the getall method returns a hash. I want to
store this hash in a reference, and I'm curious about what exactly is
going on and couldn't find clarification reading docs.
#This assigns '6/8'... why do I get a string like that when assigning a
hash to a scalar?
$conf = $confGen->getall;
#This seems to make a code reference that contains a hash...?
$conf = \($confGen->getall);
#This assigns a ref to an empty hash
$conf = \%{$confGen->getall};
#This is a little ugly
my %conf = $confGen->getall;
$conf = \%conf;
undef %conf;
Please shed some light on this for me!
HS
store this hash in a reference, and I'm curious about what exactly is
going on and couldn't find clarification reading docs.
#This assigns '6/8'... why do I get a string like that when assigning a
hash to a scalar?
$conf = $confGen->getall;
#This seems to make a code reference that contains a hash...?
$conf = \($confGen->getall);
#This assigns a ref to an empty hash
$conf = \%{$confGen->getall};
#This is a little ugly
my %conf = $confGen->getall;
$conf = \%conf;
undef %conf;
Please shed some light on this for me!
HS