> On Fri, 12 Mar 2004, R. Joseph Newton wrote:
> > Charlotte Hee wrote:
> >
> > > $byname{ Owen }{ PHONE } = '999-9999';
> >
> > Should be:
> > $byname{ Owen }->{ PHONE } = '999-9999';
> > are you using strict? The code above should cause an error, not
> > just an uninitialized variable warning. You really should put: use
> > strict; use warnings; at the top of the script, and clean up the
> > errors returned before you try to take on multidimensional structure
> > problems. Houses built on sand cannot be expected to stand.
> >
> > Joseph
$byname{Owen}{PHONE} is fine. use strict yould NOT complain.
I can't find the sentence that says $HoH{x}{y} means exactly the same
as $HoH{x}->{y}, but it does. And the perlxxx manpages are full of
examples.
Also try to run
perl -MO=Deparse -e "$HoH{x}{y} = 5;$HoH{x}->{y} = 6;"
You'll get
$HoH{'x'}{'y'} = 5;
$HoH{'x'}{'y'} = 6;
-e syntax OK
If you want to use strict:
perl -MO=Deparse -e "use strict; my %HoH; $HoH{x}{y} = 5;$HoH{x}-
>{y} = 6;"
Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>