########################################## my $outfile2 = "$Table Primer.txt"; unless (open(PTXT,"> /www/modperldocs/bioinf/data/$outfile2") ) { print "Cannot open file \"$outfile2\" to write to!!\n\n"; exit; } $dbh = DBI->connect("DBI:mysql:nucmutations",$DBUSER,$DBPASS); $sth = $dbh->prepare("USE $Table;"); $sth->execute(); $sth = $dbh->prepare("SELECT Primer, Oligoname FROM $Table;"); $sth->execute(); while (my ($X, $oligo) = $sth->fetchrow_array()) { format PTXT = >@<<<<<<<<<<<<<<<<<<<<<& lt;<<<<<<<<<<<<<<< $oligo     @<<<<<<<<<<<<<<<<<<<<<<& lt;<<<<<<<<<<<<<<<<<<<<<<; $X . write(PTXT); } close "/www/modperldocs/bioinf/data/$outfile3"; $sth->finish; $dbh->disconnect;