while(<>) { if ( /^=*Services$/m .. /^=*Users$/m ) { print "$_"; } }