while (<>) { if (/Start/ .. /End/) { # do something } }