Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Removing multiple newlines from a line using regex

by fbicknel (Beadle)
on Jul 18, 2011 at 22:38 UTC ( [id://915297]=CUFP: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $foo = do { local $/; <$fh> };
    
  2. or download this
    baz = (one two,
     three four,
     five six)
    
  3. or download this
    baz = (one two, three four, five six)
    
  4. or download this
    while ($foo =~ s/(\([^)]*)\n(.*?\))/$1$2/gs) {}
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://915297]
Approved by ikegami
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-19 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found