Perl Problem

Rick Measham rickm at printaform.com.au
Mon Sep 8 20:25:09 CDT 2003


As everyone seems to be hanging around this morning, let me post a 
programming question:

Given that $locations is a ref returned from DBI's $dbh->selectall_arrayref():

	foreach my $location (@{$locations}) {
		next unless @{$location};
		print join("\t", @{$location}) . "\n";
	}

Why does my app hang and then exactly 5 minutes later fill my apache 
error_log with 120 lines of:

[Tue Sep 09 11:13:05 2003] [error] [client 10.0.0.181] Use of 
uninitialized value in join or string at ./modules/Location.pm line 
342.

The select when pasted into psql returns 33 rows, so I'm not sure 
what's going on here...

Any help muchly appreciated.

Cheers!
Rick Measham



More information about the Melbourne-pm mailing list