Is there a chomp like Perl operator in Ruby using which I can literally
remove new line characters as show below in my Perl script:


use strict;
use warnings;

my $str1 = "Hello\n";
my $str2 = "World";
print $str1.$str2;

print "\n";

chomp($str1);

print $str1.$str2;

print "\n";

Any clue?
-- 
Posted via http://www.ruby-forum.com/.