in reply to Counting within numerous files?
Here's a bit of sample code that should help:
use strict; # these are sample files from my test directory my @files = qw(testhere.pl closure.pl hello.pl); my $semi_count; foreach my $file (@files) { open FILE, $file or die "Can't open $file: $!\n"; $semi_count += tr /;// for <FILE>; close FILE; } print $semi_count;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Counting within numerous files?
by davorg (Chancellor) on Jul 19, 2001 at 19:23 UTC |