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";
In reply to Output data to a file by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |