Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: how to find last word match ?

by bh_perl (Monk)
on Nov 24, 2010 at 07:27 UTC ( [id://873370]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://873370]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-03-28 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found