Hi
I need a
perl onliner which seaches a line starting with a pattern(last occurence) and display it.
similar to
grep 'pattern' filename | tail -1 in UNIX
Ex: I want to display the line starting with "cool" and which is a last occurence
adadfadafadf
adfadadf
cool dfadfadfadfara
adfadfadf
cool aaaaaaaaaaaaaa
hai how are you
It should dispaly the line which is red. I need it in
perl one line command
I am not sure how i should do. I have an idea that we can do it with
perl -ne 'print .........
Your help will be highly appreciated
Thanks
Ammu