Hm, odd. Please try running this program:
Output should be :#!/usr/bin/perl use strict; use warnings; local $/; my $txt = <DATA>; $txt =~ s/\n\|/ /g; print $txt; __DATA__ foo | bar baz |qux fred |wilma barney
(Note that you don't need to enclose your desired match in parentheses unless you need to "capture" it.)foo | bar baz qux fred wilma barney
In reply to Re^3: Substitution in range operator
by 1nickt
in thread Substitution in range operator
by benaw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |