Hi, to access an element of an refenreced array, you should write $array_ref->[1] for the 2nd elements of the array see perlref
Olivier Renard Mediterranean Network Developper Mail: [EMAIL PROTECTED] Tel: (+377) 97-77-60-16
AITHA, BHEEMSEN (SBCSI) wrote:
Hi,
I am using fetchall_arrayref to fetch multiple rows from the SQL result set after executing it. Then I was trying to see the values obtained, but I get the following.
ARRAY(0x203dfe4c) ARRAY(0x2085df00) ARRAY(0x2085df24) ARRAY(0x203dfe4c) ARRAY(0x2085df00) ARRAY(0x2085df24)
I was expecting to see the actual values and not array ref.
My code is below:
$array_ref = $pstmt1->fetchall_arrayref(); foreach $row (@$array_ref) { # ( $wc_cd, $sord_fnAA, $sord_fnDD ) = @$row; print "$row\n"; } $max_load_row_ct = $$array_ref[0]; $nbr_files_AA = $$array_ref[1]; $nbr_files_DD = $$array_ref[2]; print "$max_load_row_ct\n"; print "$nbr_files_AA\n"; print "$nbr_files_DD\n"; $pstmt1->finish;
I tried using @$array_ref[0] in the above assign statements. But nothing worked, please help.
Thanx.. -Bheem
_______________________________________________
Perl-Unix-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________ Perl-Unix-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
