in reply to Re^2: Substitution in range operator
in thread Substitution in range operator
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Substitution in range operator
by benaw (Novice) on Dec 30, 2015 at 06:35 UTC | |
by ww (Archbishop) on Dec 30, 2015 at 11:27 UTC | |
by 1nickt (Canon) on Dec 30, 2015 at 06:51 UTC | |
by benaw (Novice) on Dec 30, 2015 at 07:27 UTC | |
by benaw (Novice) on Dec 30, 2015 at 07:43 UTC | |
by Anonymous Monk on Dec 30, 2015 at 07:56 UTC | |
by benaw (Novice) on Jan 07, 2016 at 05:54 UTC |