Please use [id|name]-style links rather than linking explicitly, to avoid logging people out when they follow your links.
I'm going to assume that the delimiting lines are of the form:
checking image file <[^>]+> ... checking image file <[^>]+\.f>
In which case, you could do something like (untested):
my $file = ""; { local $/ = undef; $file = <INFILE>; } my %failures = (); while(my ($image, $msgs) = $file =~ /checking image file <([^>]+)> (.+?media does not exist.+?) checking image file <$1\.f>/gsx) { $failures{$image} = 1; }
The /g modifier makes the regex start right after the last successful match on every iteration of the while loop, so you go through the input all the way, rather than matching the first occurrance all the time.
This could be substantially prettier; I'm a bit sleep-deprived at the moment. Hopefully, though, it'll get you somewhere.
--
F
o
x
t
r
o
t
U
n
i
f
o
r
m
Found a typo in this node? /msg me
The hell with paco, vote for Erudil!
In reply to Re: How to act upon lines between two other lines in file?
by FoxtrotUniform
in thread How to act upon lines between two other lines in file?
by blink
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |