in reply to Re: Between START .. END
in thread Between START .. END
Now i can get the data in between <START> and <END>What do you mean with "get"? (Taking into account merlyn's answer) would something like
do?push @lines, $_ unless $where == 1 or $where =~ /E0/;
How do i abort the script if there is no <END>?IIUC you can realize that there's no end "tag" only when you terminate processing your input file. You may just maintain a flag:
my $foundend; while (<file>) { next unless my $where = /START/ .. ($foundend=/END/); # ... } print "found\n" if $foundend.
|
|---|