John Ackley wrote:
: while( ($service) = $SERVICE->fetchrow_array ) {
According to the DBI docs:
"If there are no more rows or if an error occurs,
then fetchrow_array returns an empty list."
When a value is returned, $service is set to that value.
When we get to the end of the list, () is returned and
$service is set to the undefined value. Since it tests
false, the while loop stops with $service set to an undefined
value.
You can see this in the following script.
use strict;
use warnings;
use Data::Dumper 'Dumper';
my $service;
($service) = ();
print Dumper $service;
__END__
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
Free Market Advocate
Web Programmer
254 968-8328
Don't tread on my bandwidth. Trim your posts.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>