in reply to Re^7: Help editing a file based off seach criteria
in thread Help editing a file based off seach criteria
produces: Line #, Data, Previous Line ##!/usr/bin/perl open DATA, "</home/file.conf"; while (<DATA>) { if(m/\END\b/) { print "$.\n"; print "$_\n"; $pos = $.; $pos--; print "$pos\n"; } } close(DATA);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Help editing a file based off seach criteria
by Corion (Patriarch) on Jan 13, 2009 at 17:39 UTC | |
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 | |
|