Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use File::Find; my $ct = 0; sub subrout { if( $_ =~ /\.pl$/) { while( $line = <F> ) { for $i ($line =~ /data)/gi ) { print "$i\n"; $ct++; } } close F; } } find( \&subrout, "/pathOne" ); print "\n$ct\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Output data to a file
by broquaint (Abbot) on Jun 23, 2003 at 15:16 UTC | |
by Anonymous Monk on Jun 23, 2003 at 17:59 UTC |