Re: How to process just part of a file

2012-02-11 Thread John W. Krahn
Eric Pement wrote: You can also match on line number: if ( $. == 100 ... $. == 150 ) { ... } That is the verbose way to write: if ( 100 .. 150 ) { ... } or a combination: if ( $. == 200 ... /^your reg[ex]/ ) { ... } If you are going to be verbose then: if ( $. == 2

Re: How to process just part of a file

2012-02-11 Thread Eric Pement
On Feb 9, 8:08 am, clay.lov...@carquest.com (Clay Lovett) wrote: > I have inherited a script that processes the cron and comments stuff out for > month end processing. We have added some store that do not run the same > monthly calendar as the rest of the stores. What I need to know is how to add

Re: How to process just part of a file

2012-02-09 Thread Igor Dovgiy
First, we should make sure that we can recognize the beginning and the end of section within CRONDMP file itself. For example, let's define my $SEC_START = '## SECTION START', my $SEC_END = '## SECTION END'; When the source file contains both of these, and so the section we need is clearly ma