open(OUT, ">D:\\SQL_INHALT.txt"); print OUT $sth; close(OUT);