If the file is not to large, it probably is easier to slurp the file into an array and then go through the array backwards looking for the first occurance.
Update: I just heard of the module File::ReadBackwards. It may be what you need for longer files.
In reply to Re: Look Ahead regexp to insert line?
by BillKSmith
in thread Look Ahead regexp to insert line?
by bowei_99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |