Thank you very much, You saved my day! Thank you again, It worked. Regards, Manjula
On Thu, Jul 28, 2011 at 3:10 AM, Junjun Zhang <[email protected]>wrote: > Hi Manjula, > > There are two simple ways to output the Perl API query result into a file. > > > - Using I/O redirection. > > perl myPerlAPI.pl > my_query_results.txt > > > - Using filehandle in Perl. The printResults() method (as well as > printHeader() and printFooter()) takes an optional filehandle as argument. > It works like this: > > use IO::File; # add this to the beginning of your script > > my $fh = IO::File->new("> my_query_results.txt"); # create a new filehandle > > $query_runner->printHeader($fh); # output header to the file > $query_runner->printResults($fh); # output the results to the file > $query_runner->printFooter($fh); # output the footer to the file > $fh->close; # close the file > > Hope this helps, > > Junjun > > > > > From: Manjula Dharmawardhana <[email protected]> > Date: Wed, 27 Jul 2011 03:24:15 -0400 > To: "[email protected]" <[email protected]> > Subject: [BioMart Users] Saving Results of Perl query to file > > Hi All, > I will be grateful if anybody can give a example showing how I can save the > output of the Perl API query to a file. The "printResults()" only prints the > results. How can I load it in to variable for further manipulation? > Sorry If this is too basic. But I tried but could not find a way. > Thanking in advance, > > Manjula > > -- * <http://lk.linkedin.com/in/manjulapra> * *This communication (including any attachments) is intended for the use of the intended recipient only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify [email protected] by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.*
_______________________________________________ Users mailing list [email protected] https://lists.biomart.org/mailman/listinfo/users
