in reply to Counting occurances of a pattern in a file
while(<INPUT>) { $n+=/^Algorithm/; last if /^Experiment/ } [download]