in reply to Re: Re: Help Matching Sections of a file
in thread Help Matching Sections of a file
The last also fixes the (presumed) problem of looping through the whole file even after you've found the relevant section. Notice the \b too which I forgot.while (<FOO>) { print if /Port\s+$port\b/ .. /^#---/ && last; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Help Matching Sections of a file
by Elijah (Hermit) on Apr 05, 2004 at 15:17 UTC | |
by TilRMan (Friar) on Apr 05, 2004 at 16:26 UTC |