in reply to 'one-liner' help
If I understand you correctly, the problem is that (by default) -p and -n cause the file(s) to be processed line-by-line. Therefore your regex is being applied line-by-line and can never match a pattern that stretches across more than one line as it never sees more than one line at any one time. Phew! What a mouthful:)
To work around this problem, you would need to cause the file to be processed as a single long line using 'slurp mode'. Try adding -0777 to your command line. See perlrun for details.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: 'one-liner' help
by buc99 (Initiate) on Apr 16, 2003 at 23:01 UTC | |
by dws (Chancellor) on Apr 16, 2003 at 23:03 UTC |