[Bioperl-l] The usage of $field->$_
Mark A. Jensen
maj at fortinbras.us
Fri Jun 4 20:06:55 UTC 2010
This is a fairly basic perl idiom. $_ is changing with the outer loop containing
the print statement, which is probably looping through the accessors for the
object represented by $field.
----- Original Message -----
From: "Peng Yu" <pengyu.ut at gmail.com>
To: <bioperl-l at lists.open-bio.org>
Sent: Friday, June 04, 2010 12:15 PM
Subject: [Bioperl-l] The usage of $field->$_
> In the Eutilities cookbook,
> http://www.bioperl.org/wiki/HOWTO:EUtilities_Cookbook
>
> I see the following code,
>
> print join(',', grep {$field->$_} qw(is_date
> is_singletoken is_hierarchy is_hidden is_numerical)),"\n\n";
>
> I'm not quite familiar with the usage of $field->$_. I don't see where
> it is covered in man perlvar (I don't the usage of $_ for pattern
> matching, but not in $variable->$). Would you please let me know where
> is the document that explain this usage?
>
> --
> Regards,
> Peng
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
>
More information about the Bioperl-l
mailing list