while() { $n+=/^Algorithm/; last if /^Experiment/ }