I'll put in my two cents worth. Use Tie::File to get an array and then reverse it before traversing it.
use warnings; use strict; use Tie::File; tie my @filearray, 'Tie::File', 'backwards.log' or die "couldn't tie f +ile $!\n"; foreach (reverse @filearray) { if (/received/) { printf "%s %s\n", (split)[0,1]; last; } }
In reply to Re: one liner question
by Lotus1
in thread one liner question
by natxo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |