in reply to Reading chunks of data and then working on it
Modify the input record separator appropriately to read in a chunk at a time.
use warnings; use strict; $/ = "_END=======\n"; while (<DATA>) { s/========KEYWORD.+\n//g; print '-' x 80, $_, '-' x 80; } __DATA__ ========KEYWORD 1=========== Text text text ========KEYWORD 1_END======= ========KEYWORD 2=========== Text text text ========KEYWORD 2_END======= ========KEYWORD 3=========== Text text text ========KEYWORD 3_END=======
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading chunks of data and then working on it
by legend (Sexton) on Feb 26, 2008 at 20:18 UTC | |
by BrowserUk (Patriarch) on Feb 26, 2008 at 23:15 UTC |