in reply to How do I call a DOS command with a /C variable in PERL ?
my $file = "/path/to/file/and/filename"; open(LOG,"$file") or die; my $match_count; while(<LOG>) { my (@matches) = $_ =~ m/(127\.0\.0\.1)/g; $match_count += scalar(@matches); } print $match_count , "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How do I call a DOS command with a /C variable in PERL ?
by sheabo (Initiate) on Jan 28, 2002 at 10:57 UTC |