in reply to
Removing Line Breaks
If you only want to remove line breaks at the end of a variable, use
chomp $variable;
[download]
If you want to remove
all
line breaks, use
$variable =~ tr/\n//d;
[download]
Comment on
Re: Removing Line Breaks
Select
or
Download
Code
In Section
Seekers of Perl Wisdom