xossa has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Getting some lines between 2 lines
by toolic (Bishop) on Nov 03, 2011 at 17:18 UTC
    Range Operators are handy for this...
    use warnings; use strict; while (<DATA>) { print if /line X/ .. /Line Y/; } __DATA__ HLU Number ALU Number ---------- ---------- 0 233 ==> line X 1 234 2 235 3 236 4 237 5 238 6 240 7 239 8 241 9 243 10 242 11 244 12 245 13 246 14 247 15 263 16 248 17 249 18 250 19 251 20 252 21 253 22 254 23 255 ==> Line Y Shareable: YES
    This is a FAQ:
    perldoc -q between
Re: Getting some lines between 2 lines
by Anonymous Monk on Nov 03, 2011 at 17:20 UTC