while () { print "\t" if (/start/ ... /end/); print $_; } __DATA__ First line. Indent lines between the start and the end markers So this is indented, and this is the end of the indented block. Back to left margin