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