use strict; use warnings; my $trig = 'Significant Accounting Policies'; my $res; while (){ if ($_ =~/$trig/i){ $res = $_; next; } $res.=$_ if $res; } print $res; __DATA__ Wal-mart talks about its Significant Accounting Policies in its 10k. Significant Accounting Policies are important for a firm. Here is a list of the Significant Accounting Policies 1)Lifo 2)Depreciation 3)Expenses