in reply to Re^2: Newbie - convert carriage return in a variable
in thread [Solved]Newbie - convert carriage return in a variable
Add the g modifier to your regex
poj#!perl use strict; my $text = 'foo bar'; $text =~ s/\n/<br \/>/g; print $text;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Newbie - convert carriage return in a variable
by Balawoo (Novice) on Feb 17, 2019 at 19:06 UTC |