foreach my $row ($sth->fetchrow_arrayref()){ print ".HIER\n"; $var1 = join("|",@row); print "$var1\n"; }