Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Replace new line with white space

by wind (Priest)
on Mar 09, 2014 at 21:45 UTC ( [id://1077623]=note: print w/replies, xml ) Need Help??

in reply to Replace new line with white space

I suspect that what you really need is chomp, and that you don't need a regex at all.
while (<$fh>) { chomp; # Line in $_ no longer has trailing \n
However, without seeing your code we can't confidently advise you either way.

Replies are listed 'Best First'.
Re^2: Replace new line with white space
by fattahsafa (Sexton) on Mar 10, 2014 at 21:21 UTC
    Thanks for responding. But chomp only trims the new line at the end of the string.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1077623]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-22 22:53 GMT
Find Nodes?
    Voting Booth?

    No recent polls found