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 reply to Re^3: Join lines that match an string
by linuxer
in thread Join lines that match an string
by ranrodrig
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |