http://www.perlmonks.org?node_id=562000


in reply to Understanding this line of Code

$Aoh{ testa } = @{ exec_select ($sql ) } [0] ->{ home1 };

This piece of code basically does the following

"Can't use an undefined value as a HASH reference..."

This error is caused by the first element in the above array being undefined. Therefor it can't be dereferenced as a hash.

Cheers, Flo

Replies are listed 'Best First'.
Re^2: Understanding this line of Code
by davorg (Chancellor) on Jul 18, 2006 at 13:17 UTC
    This error is caused by the first element in the above array being undefined. Therefor it can't be dereferenced as an array.

    I think you mean "it can't be dereferenced as a hash".

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

      Of course. Fixed.

      Thanks, Flo