#!/usr/bin/perl use warnings; use strict; my $printing; my $next_section = q(); while () { if (/^\(([0-9]+)\) .*Significant Accounting Policies/) { $printing = 1; $next_section = 1 + $1; } elsif (/^\($next_section\)\s/) { undef $printing; } print if $printing; } __DATA__ (1) Preface What is this all about. (2) Summary of Significant Accounting Policies Revenue Recognition Revenue is recognized at the time goods are sold and shipped. (3) Long-term Debt #### ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,