Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by petral (Curate)
on Feb 03, 2003 at 23:40 UTC ( #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
Node Status?
node history
Node Type: note [id://232413]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2014-08-20 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (109 votes), past polls