I've used Tie::File successfully to tie an array to a file .. then you can just scan through the array until you find your 'zzzzz' match, then check the previous element for 'yyyyy', and if successful, the one before that for 'xxxxx'.
As always, There's More Than One Way To Do It. :)
In reply to Re: regex on previous lines
by talexb
in thread regex on previous lines
by MacScissor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |