From: Josh Cheek Date: 2010-05-16T06:45:29+09:00 Subject: Re: chomp like Perl operator in Ruby --0016e6db2979e8c0c00486a8e86d Content-Type: text/plain; charset=ISO-8859-1 On Sat, May 15, 2010 at 4:26 PM, Parag Kalra wrote: > 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/. > > The online docs (plus a few examples) for the method Ben showed the ri of http://ruby-doc.org/core/classes/String.html#M000819 --0016e6db2979e8c0c00486a8e86d--