If the file size is not too large you could read in the whole text and replace each instance of a new line followed by a pipe, with a space. Then afterwards go through it again line by line and make your other substitutions.
local $/; open my $fh, '<', 'file.txt' or die $!; my $txt = <$fh>; $txt =~ s/\n\|/ /g; for ( split '\n', $txt ) { # process each line }
In reply to Re: Substitution in range operator
by 1nickt
in thread Substitution in range operator
by benaw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |