Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^3: Join lines that match an string

by linuxer (Deacon)
on Jul 13, 2010 at 17:21 UTC ( #849324=note: print w/ replies, xml ) Need Help??

in reply to Re^2: Join lines that match an string
in thread Join lines that match an string

But I still have the feeling I didn't get the whole idea correctly; especially when I see ambrus' solution.

If you want to keep the linebreak in the "p_agrs" line, then tell perl not to chomp it.


perl -wpe 'if ( m/\bremotely\b/ ... m/\bp_agrs\b/ ) { chomp unless m/\bp_agrs\b/ }'

Comment on Re^3: Join lines that match an string
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-09-18 10:20 GMT
Find Nodes?
    Voting Booth?

    How do you remember the number of days in each month?

    Results (110 votes), past polls