Fair enough, so I did, using the following:
while(<DATA>) {
print if (/line1/ ... /line5/);
}
__DATA__
line1
line2
line3
line4
line5
Outputs all the lines, including the start and end "markers". So, unless I am doing something wrong, I don't see how this is any different from the .. operator I have used in the past (at least under 5.8)?
Reason I didn't just try it (which I should have anyway, admittedly) is that I thought myself and others would benefit from a little further explanation.
Guess it's RTFM time for me... |