in reply to "use strict" and undeclared variables
You can change your code to read while (my @row = $sth->fetchrow_array()){ to fix it and still use strict;.
Perl 6 in German