http://qs1969.pair.com?node_id=873370


in reply to Re: how to find last word match ?
in thread how to find last word match ?

<hi>
This is my opinion by using shell script
system ("cat file.txt |grep "Baki" |tail -1");

Replies are listed 'Best First'.
Re^3: how to find last word match ?
by eyepopslikeamosquito (Archbishop) on Nov 24, 2010 at 07:38 UTC
      perl -e 'print((grep/Baki/,<>)[-1])' file.txt