note
choroba
What do you mean by "do a Regex"? Do you want to match the lines agains regular expresisons, or do you want to modify the lines via substitution?<p>
As usually, there are more ways how to do that. For example, if you are in a *nix environment, you can <c>tac</c> your file and process it from the last line. Or, you can remember the last two lines in case you want to process them:<c>
my @lines;
while (<>) {
push @lines, $_;
shift @lines if @lines > 3;
}
if ($lines[2] =~ $regex1) {
if ($lines[1] =~ $regex2) {
if ($lines[0] =~ $regex3) {
# Do your work here.
}
}
}
</c>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-832495">
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
</div></div>
1016346
1016346