in reply to How to make a variable in a single line

line breaks that caused by enter button?

You mean remove newlines?  s{[\r\n]+}{}g

Replies are listed 'Best First'.
Re^2: How to make a variable in a single line (remove newlines)
by bcarroll (Pilgrim) on Jun 05, 2013 at 12:24 UTC
    chomp()?

    or better yet,
    local $/;

    For more on $/... perlvar

      chomp doesn't remove newlines, it chomps