in reply to find a string into an interval
produces output#!/usr/bin/perl use strict; use warnings; while (<DATA>) { print if /string1/../string2/; } close DATA; 1; __DATA__ this is string0 line and this is string1 line this might be string1a line and this line has string2 to finish, string3 line ends it all
and this is string1 line
this might be string1a line
and this line has string2
Note that sometimes people use the __DATA__ feature to show file I/O related code. Please don't let that confuse you.
|
|---|