> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of > Tom Phoenix > Sent: Wednesday, 07 June, 2006 08:00 > To: Ron Goral > Cc: beginners@perl.org > Subject: Re: reading Perl syntax > > > On 6/7/06, Ron Goral <[EMAIL PROTECTED]> wrote: > > > Merely referencing a key in a hash sets it into the hash, though with a > > value of undef. > > This turns out not to be the case. In Perl, merely referencing a key > in a hash doesn't change the hash. Some non-Perl hash implementations > do change the hash in those circumstances, though, so your confusion > is understandable. > > my %last_name; > $last_name{'fred'} = 'flintstone'; # creates key 'fred' in hash > my $x = $last_name{'barney'}; # does not create key 'barney'
Ouch. Tom is, of course, right in this. Sorry for the misinformation. Peace - Ron Goral -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>