[Bioperl-l] How to print get_available_databases?
Chris Fields
cjfields at illinois.edu
Fri Jun 4 15:14:08 UTC 2010
On Jun 4, 2010, at 9:47 AM, Peng Yu wrote:
> Hi,
>
> I want to print get_available_databases using foreach. But it prints
> all 1's. I know that this is a perl question. But I still ask it here
> because people on a more general perl mailing may not have bioperl
> installed.
>
> ...
> foreach($factory->get_available_databases) {
> print
> print "\n";
> }
>
>
> --
> Regards,
> Peng
You are missing a semicolon:
foreach($factory->get_available_databases) {
print;
print "\n";
}
Without it, the first print() prints the results of the second print() (which prints the newline), which evals to success, or 1.
chris
More information about the Bioperl-l
mailing list