If the file is of modest size then read eveything into a string and:
Update: Change to read from a "file"my $str = <DATA>; my @strs = $str =~ /START(.*?)END/g; print join "\n", @strs; __DATA__ somecharSTARTfvENDsomecharSTARTsvENDsomecharSTARTtvENDsomechar
Monarch has suggested to me that this is likely to get pretty slow with HUGE files, and I agree. For very large files I'd suggest using this technique.
In reply to Re: How to deal with long line
by GrandFather
in thread How to deal with long line
by gasho
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |