James Edward Gray II wrote:

> On Mar 13, 2004, at 12:36 AM, 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.
>
> This isn't true.  The arrow operator (->) is optional between [ ]s and
> { }s.  The two lines above are identical as far as Perl is concerned
> and error free.
>
> James

OK, I stand corrected on the issue of strict legality.  I will still advise
newbies to avoid the contracted version, though.  The arrow operator there
serves a very useful self-documenting purpose, IMHO, since it more closely
reflects the logic of how the elements are accessed.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to