in reply to Re^8: Help editing a file based off seach criteria
in thread Help editing a file based off seach criteria
That's a first step in the right direction. Now, you don't want to print the line number of the previous line, but the content of the previous line. So you will need to come up with some way to remember the previous line and output it when the current line matches /^END$/ (I note you wrote /\END\b/, but I assume that's not what you mean). As I outlined several replies before this one, one possible approach could be:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Help editing a file based off seach criteria
by perlnewb123 (Sexton) on Jan 13, 2009 at 17:56 UTC | |
by Corion (Patriarch) on Jan 13, 2009 at 18:04 UTC | |
by perlnewb123 (Sexton) on Jan 13, 2009 at 18:07 UTC | |
by Corion (Patriarch) on Jan 13, 2009 at 18:13 UTC | |
by perlnewb123 (Sexton) on Jan 13, 2009 at 18:31 UTC | |
|