in reply to Code flow not going to while loop

When in doubt, check for errors. You're called fetchrow_array and not getting what you expect, so I would follow the documentation (DBI: You should check $sth->err afterwards (or use the RaiseError attribute) to discover if the empty list returned was due to an error.).

I'm not embarrassed to admit that I'm a fan of the Perl debugger .. much is revealed when running a script through the debugger.

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.