|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re^3: Join lines that match an stringby linuxer (Deacon) |
| on Jul 13, 2010 at 17:21 UTC ( #849324=note: print w/ replies, xml ) | Need Help?? |
|
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. Example: perl -wpe 'if ( m/\bremotely\b/ ... m/\bp_agrs\b/ ) { chomp unless m/\bp_agrs\b/ }'
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||