Help for this page
Select Code to Download
Select
or
download this
while(<>) { $line = chomp; $count++ if ($line =~ /foo/); } print $count;