anasuya has asked for the wisdom of the Perl Monks concerning the following question:
Hi. I have a file, which looks similar to what I have provided below. I want to extract out CONSECUTIVE lines, which do not have NIL after the '=' sign.
Thus, I would want the output to look like this:1yxq_SWI_B_600 = c.55.1.1- 1grh_ADW_A_479 = NIL 1fm9_570_D_200 = a.123.1.1- 1ec1_BEE_A_501 = b.50.1.1- 1fm9_570_D_200 = a.123.1.1- 2zmh_NYA_A___1 = a.123.1.1- 1gvh_HQQ_A1398 = a.1.1.2-c.25.1.5- 1v9y_HDQ_A1140 = d.110.3.2- 1mqt_SPL_A_284 = NIL
Please help. Thanks.1fm9_570_D_200 = a.123.1.1- 2zmh_NYA_A___1 = a.123.1.1- 1gvh_HQQ_A1398 = a.1.1.2-c.25.1.5- 1v9y_HDQ_A1140 = d.110.3.2-
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: restricting matching only to consecutive lines
by RichardK (Parson) on Mar 25, 2012 at 14:52 UTC | |
Re: restricting matching only to consecutive lines
by stevieb (Canon) on Mar 25, 2012 at 20:06 UTC | |
by anasuya (Novice) on Mar 26, 2012 at 09:25 UTC |
Back to
Seekers of Perl Wisdom