Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: how to find last word match ?

by eyepopslikeamosquito (Archbishop)
on Nov 24, 2010 at 07:38 UTC ( [id://873374]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -ne '/Baki/ and $x=$_}{print$x' file.txt
    
  2. or download this
    perl -ne '/Baki/ and $x=$_; END{print$x}' file.txt
    
  3. or download this
    cat file.txt |grep "Baki" |tail -1
    
  4. or download this
    grep 'Baki' file.txt |tail -1
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-19 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found