in reply to wise ones, your help is needed

Hi,
In your line:
while (( my $id1, my $text) = $sqlquery3->fetchrow_array)
You do not check if the query indeed returns a second value for $text. You should check if the variables get values before you use them.

hth,

Jouke Visser, Perl 'Adept'