 Keep It Simple, Stupid  Comment on   If you want the filenames
and not the handles for the files that match the pattern, it is
better to operate on the filenames and not the handles. If you
want the handles, my code can be modified easily: just pass in
the handles and remove the open statement.  use strict; use
warnings; use autodie; sub findpattern { my $file = shift; my
$pattern = shift; open my $fh, '<', $file; while(my
$line=<$fh>){ return 1 if $line =~ /$pattern/; } return 0; } my
@files = <*.pl>; my @success = grep { findpattern( $_,
"Data::Dumper" ) } @files; print join "\n", @success, "\n";  In
reply to Re: Array of filehandles by hdb in thread Array of
filehandles by amma  and:  <code> code here </code>    • Please
read these before you post! —             For:     Use:     &
&amp;     < &lt;     > &gt;     [ &#91;     ] &#93;   • Log In?
What's my password?     Create A New User     and the web
crawler heard nothing...      How do I use this? | Other CB
clients     Other Users?     Others lurk