Re: Pseudo-hashes are deprecated
- From: Peter@xxxxxxxx (Peter Scott)
- Date: Tue, 29 Jan 2008 07:08:11 -0800
On Tue, 29 Jan 2008 07:45:00 -0500, Harry Bennett wrote:
I am using this line:
foreach my $pair (keys %{$config{server}}) {
.....
}
but get the warning:
Pseudo-hashes are deprecated at ......
I am using the example from 'Programming Perl (third edition)' Section 9.4.3
I guess my ultimate question would be, what have they been deprecated to?
You don't need to know, because they don't work at all in 5.10, and
besides, that example doesn't use them; you translated it incorrectly.
And an example would be GREATLY appreciated.
Somehow you got an arrayref containing a hashref inside $config{server},
and that maketh a pseudohash (see section 8.3.5):
my $sudoh = [ {foo => 1, bar => 2} ];
my %config = (server => $sudoh );
You wanted just the hashref there.
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
.
- References:
- Pseudo-hashes are deprecated
- From: Harry Bennett
- Pseudo-hashes are deprecated
- Prev by Date: Re: groups of values from an array
- Next by Date: RE: groups of values from an array
- Previous by thread: Re: Pseudo-hashes are deprecated
- Next by thread: Re: Pseudo-hashes are deprecated
- Index(es):
Relevant Pages
|
|