in reply to Re^2: Referring to an array without copying to a separate variable first
in thread Referring to an array without copying to a separate variable first

which doesn't make sense.

Sure it does, $res just happens to be a hash

  • Comment on Re^3: Referring to an array without copying to a separate variable first

Replies are listed 'Best First'.
Re^4: Referring to an array without copying to a separate variable first
by LanX (Saint) on Jun 27, 2013 at 00:14 UTC
    > Sure it does, $res just happens to be a hash

    No it never does, since the code @{$res}->{objects} tries to dereference a hash-ref not an array.

    But interestingly this magically (?) works:

    DB<112> @a="a".."d" => ("a", "b", "c", "d") DB<113> @a->[2] => "c"

    aaaah! =)

    DB<114> use warnings; @a->[2] Using an array as a reference is deprecated ...

    Cheers Rolf

    ( addicted to the Perl Programming Language)