[Bioperl-l] parallel processing with perl

gowthaman ramasamy gowtham at icgeb.res.in
Fri Jul 16 04:27:23 EDT 2004


Hello list,
Please ignore this question if it sounds like not related to BIOPERL.

 have a lengthy Perl script running on a 4 processor machine. At one
point of time i have to execute four mysql quries from
four different batch files (via shell). Currently i run them one after
other. Can i some how fire them simultaneously so that they occupy all 4
processors and does the job quickly.

portion of script follows ...
#!/usr/bin/perl
.............
...........
$var1=`mysql -h localhost -u xx -pyy filter < batchfile1.sql |tail -1`;
$var2=`mysql -h localhost -u xx -pyy filter < batchfile2.sql |tail -1`;
$var3=`mysql -h localhost -u xx -pyy filter < batchfile3.sql |tail -1`;
$var4=`mysql -h localhost -u xx -pyy filter < batchfile4.sql |tail -1`;

$total=$var1+$var2+$var3+$var4;

NOTE : I dont want to use Perl-DBI.
many thankx in advance



-- 
Ra. Gowthaman,
Graduate Student,
Bioinformatics Lab,
Malaria Research Group,
ICGEB , New Delhi.
INDIA

Phone: 91-9811261804
       91-11-26173184; 91-11-26189360 #extn 314



More information about the Bioperl-l mailing list