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

#!perl use strict; my $text = 'foo bar'; $text =~ s/\n/<br \/>/g; print $text;
poj

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
    Thanks @poj It's solved