On Sat, May 15, 2010 at 4:26 PM, Parag Kalra <paragkalra / gmail.com> 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