in reply to Re: Regex Confusion
in thread Regex Confusion

chomp does not remove all newlines from a string, only the last newline. This removes all newlines:
$string =~ s/\n//g;
More precisely:
This safer version of "chop" removes any trailing string that corresponds to the current value of $/ (also known as $INPUT_RECORD_SEPARATOR in the English module).

Replies are listed 'Best First'.
Re^3: Regex Confusion
by Kelly22 (Novice) on Feb 10, 2010 at 15:13 UTC
    Thank you, I realy should have known that, but now I should never forget.