in reply to Shortening "$bar{foo} if exists $bar{foo}"?

The deref op '->' is unnecessary there, and there is an alternative of nearly the same length with the and op, exists $bar{'foo'} and $bar{'foo'}();

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Shortening "$bar{foo} if exists $bar{foo}"? (nit)
by tye (Sage) on Oct 04, 2003 at 07:00 UTC

    Actually, it wasn't all *that* long ago when the -> wasn't optional in that construct (I believe 5.006 is when that happened and perldelta agrees with me).

    It is getting close to long enough ago that I'd forget this fact -- except that I tend to answer a lot of questions from people about Perl and many of those people have surprisingly old versions of Perl. (:

                    - tye