http://qs1969.pair.com?node_id=1037195


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

$your_variable_containing_newlines =~ tr/\n\r//d;
UPDATE: typo corrected.

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^2: How to make a variable in a single line
by Anonymous Monk on Jun 05, 2013 at 13:11 UTC
    What is \d?

     s{ \R+ }{}gx aka  s{[\x{000A}\x{000C}\x{000D}\x{0085}\x{2028}\x{2029}]+}{}g

      Thanks, I corrected my posting.

      -- 
      Ronald Fischer <ynnor@mm.st>