Both are correct from Perl's perspective, but it looks like you're
confusing Komodo's parser. Either use another tool, or stick to the
explicit style you're already aware of which doesn't trigger the
warning.
On Jan 21, 2008 9:50 AM, Adam BE <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>
>
> What is the correct way / best practice of taking a slice of a hash reference:
>
> @{$hash_ref}{ @keys };
>
> Or: @$hash_ref{ @keys };
>
>
>
> Using @$hash_ref{ @keys } I get a "@$hash_ref Not an ARRAY reference" warning
> in Komodo
>
> however I get no warning when running the same code with use strict and use
> warnings
>
> in the Perl debugger.
>
>
>
> Am I missing something?
>
> Thanks,
>
> Adam.
>
>
>
>
>
>
> ____________________________________________________________________________________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> _______________________________________________
> Perl mailing list
> [email protected]
> http://perl.org.il/mailman/listinfo/perl
>
--
Gaal Yahas <[EMAIL PROTECTED]>
http://gaal.livejournal.com/
_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl