in reply to Mactching arrays and reg. exp.
HEAD . . . TAIL and ends with suppose America 331If your file looked something like what is above, you could do the following:
--ericmy $read = 1; my @output; foreach my $line (@array){ if($line =~ /HEAD/){ $read=0; } elsif($line =~ /TAIl/){ $read=1; } push @output, $line if $read; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Matching arrays and reg. exp.
by davorg (Chancellor) on Aug 03, 2000 at 19:14 UTC | |
by Anonymous Monk on Aug 03, 2000 at 20:18 UTC |