Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: The problem with one-liners...

by petral (Curate)
on Feb 03, 2003 at 23:40 UTC ( [id://232413]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
       # Last line of a file
       perl -pe '$*=$_}{$_=$*' file
    
  2. or download this
       perl -pe '$*||=$_; $\=$_}{$_=$*' file
    
  3. or download this
       # Exit after first match
       perl -ne 'print; last if /foo/' file
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-23 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found