############ erstes file schreiben: ############### my $outfile1 = "$Table Alignment.txt"; unless (open(ALNTXT, "> /www/modperldocs/bioinf/data/$outfile1") ) { print "Cannot open file \"$outfile1\" to write to!!\n\n"; exit; } $dbh = DBI->connect("DBI:mysql:database", $DBUSER,$DBPASS); $sth = $dbh->prepare("USE $Table;"); $sth->execute(); $sth = $dbh->prepare("SELECT Id, Origin, Sequence FROM $Table;"); $sth->execute(); while (my ($Nr, $Name, $AS) = $sth->fetchrow_array()) { chomp($AS); format ALNTXT = >@<<<<<<<<<<<<<<<<<<<<<& lt;<<<<<<<<<<<<<<< $Nr       @<<<<<<<<<<<<<<<<<<<<<<& lt;<<<<<<<<<<<<<<<<<<<<<<; $AS . write(ALNTXT); } close "/www/modperldocs/bioinf/data/$outfile1"; $sth->finish; $dbh->disconnect;