in reply to Re^5: Reg exp questions
in thread Reg exp questions

So finally, $str =~ s/\n/ /g; removes \n. Does it remove EOF, too? If so, how to avoid?

Replies are listed 'Best First'.
Re^7: Reg exp questions
by Happy-the-monk (Canon) on Nov 08, 2014 at 20:28 UTC

    So finally, $str =~ s/\n/ /g; removes \n. Does it remove EOF, too?

    removes \n ... replaces \n by a blank.

    And no, it has no effect on the EOF character.

    Cheers, Sören

    Créateur des bugs mobiles - let loose once, run everywhere.
    (hooked on the Perl Programming language)