Coloreado en 0.000 segundos, usando GeSHi 1.0.8.4
Using perl Syntax Highlighting
- #!/usr/bin/perl
- use DBI;
- use DBD::mysql;
- #Mis variables de configuración
- $host = "mi_host";
- $port = "3306";
- $database = "pfam";
- $user = "mi_usuario" ;
- $pw = "mi_paswd" ;
- #Perl mysql connect ()
- $dsn="DBI:mysql:$database:$host:$port";
- $db=DBI->connect($dsn, $user, $pw);
- #$connect = mysql -> connect ($host, $database, $user, $pw) or die "Connection Error\n";
- #Select DB
- #$connect->selectdb($database);
- #Abro el file con las lista de pfamseq_acc a consultar
- open FILE, "acc_uniq_com" or die ("can't open the file");
- @myfile = <FILE> ;
- #Define MySQL Query
- foreach $linea(@myfile)
- {chomp ($linea);
- $myquery ="SELECT distinct pfamseq.pfamseq_acc,pdb_residue_data.pdb_id,pdb_residue_data.chain, pdb_pfamA_reg.pdb_res_start, pdb_pfamA_reg.pdb_res_end, pdb.method, pdb.resolution, pdb_pfamA_reg.seq_start, pdb_pfamA_reg.seq_end, pfamA_acc FROM pdb, pdb_pfamA_reg, pfamA, pfamseq, pdb_residue_data WHERE pdb_residue_data.pdb_id=pdb.pdb_id and pdb_residue_data.pfamseq_acc=pfamseq.pfamseq_acc and pdb.pdb_id=pdb_pfamA_reg.pdb_id and pfamA.auto_pfamA=pdb_pfamA_reg.auto_pfamA and pfamseq.auto_pfamseq=pdb_pfamA_reg.auto_pfamseq and pfamseq.pfamseq_acc = $linea" ;
- #Preparar la consulta
- $consulta = $db -> prepare ("$myquery");
- #Execute the Query Function
- $consulta -> execute();
- my @results;
- while (@result = $consulta -> fetchrow_array ()) {
- foreach (@result)
- {print "$_" ; }
- }
- }
- $consulta -> finish();
- $db->disconnect;
Coloreado en 0.005 segundos, usando GeSHi 1.0.8.4
Mi problema es el formato de salida, estoy imprimiendo todas las columnas sin separador y todas las lineas juntas.
Ej:
Using text Syntax Highlighting
P007201l60A24148x-ray1.7024148PF00959P00720250lA24148x-ray1.8024148PF00959P00720110lA24148x-ray1.7024148PF00959
Salida deseada: