in reply to Understanding this line of Code

It looks like you have a subroutine called exec_select() that returns a reference to an array of hashes. Updated: underlined text added due to pedantry ;)

@{ exec_select( $sql ) } refers to the list returned, [0] accesses the 0'th element, ->{ home1} dereferences the hash (of the 0'th element of the list), and assigns that hash value to your %Aoh hash, specifically the testa key of that hash.

HTH



--chargrill
$,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}

Replies are listed 'Best First'.
Re^2: Understanding this line of Code
by davorg (Chancellor) on Jul 18, 2006 at 13:19 UTC
    It looks like you have a subroutine called exec_select() that returns an array of hashes.

    <pedant>
    Actually, it returns a reference to an array of hashes.
    </pedant>

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

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