#!/usr/bin/perl $/ = "\n\n"; while (<>) { if (/ESTC/) { $count++; # print; } } print "$count\n";