Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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?
[Corion]: marto: How's things? I hope the kids are fine and you too!
[Corion]: Oh yay. I wonder why a very simple change in a program doesn't elicit a diff, and now I see that my diff program seems to have a bug ;)

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2017-12-11 11:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (289 votes). Check out past polls.

    Notices?