@lines=reverse <$fh>
or
@lines=reverse split /\n/, $multiline
Now you can loop over @lines and exit with last whenever a regex fails.
Cheers Rolf
In reply to Re: regex on previous lines
by LanX
in thread regex on previous lines
by MacScissor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |