Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Used the following:# input phn .. .. # 1ord
But this prints out the first finding of phna_ through to first 1ord. 5 lines separate these patterns in the text file Tried this also, but this seems to starts printing from a poisiton i dont expect it to:if (/phn_a/ ... /1ord/) { print OUT $_; }
$nLines = 5 if ( /1ord$/ ); print OUT if $nLines-- > 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: extracting lines
by neniro (Priest) on Jul 02, 2004 at 10:38 UTC | |
by Anonymous Monk on Jul 02, 2004 at 10:43 UTC | |
by Anonymous Monk on Jul 02, 2004 at 10:46 UTC | |
by Anonymous Monk on Jul 02, 2004 at 10:51 UTC | |
by neniro (Priest) on Jul 02, 2004 at 11:02 UTC |