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


in reply to Re: Re: MySQL / Perl Question
in thread MySQL / Perl Question

I assume you're talking about this line:
my ( $count ) = $sth->fetchrow_array();
fetchrow_array() returns an array. If you assign it like:
my $count = $sth->fetchrow_array();
assuming the SQL that I gave as an example, $count will always equal 1, the scalar context of the array on the right hand side. The parans are there to keep the array context and are quite necessary in this case.

-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important