#!/usr/bin/perl -w use strict; my $found = 0; while (<>) { if ($found or /RE(.*?)/) { $found = 1; print; } }