William M West wrote:
Gunnar Hjalmarsson wrote:
Make it a habit to study the docs for the functions you are
using:
perldoc -f grep
perldoc -f readdir
oddly- the grep documentation in perldoc doesn't even mention
filehandles. readdir does show proper use though- when i looked up
grep in the perldocs, the issue remained unclear to me.
The grep() documentation doesn't mention filehandles because the
purpose of grep() is to deal with a LIST, irrespective of how the LIST
was generated. A filehandle within <> symbols may return a list in
list context. An array may as well, as does the plain
('one', 'two', 'three') notation or any function or operator that
returns a list...
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>