polr has asked for the wisdom of the Perl Monks concerning the following question:
where words are not necesarily the same. I want to edit the first line, only if the second line has a specific word in it. I can fall through every line in the file with while <> and check every line but I cannot then backtrack to the previous line to edit it. Is there a way???*********************** word1 word2 word4 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12 word13 ************************
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: edit text
by mirod (Canon) on Dec 12, 2001 at 16:24 UTC | |
|
Re: edit text
by davorg (Chancellor) on Dec 12, 2001 at 16:26 UTC | |
|
Re: edit text
by tachyon (Chancellor) on Dec 12, 2001 at 16:20 UTC | |
|
Re: edit text
by derby (Abbot) on Dec 12, 2001 at 21:36 UTC |