Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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?
[Lady_Aleena]: Corion, I knew that, I was just giving Discipulus a hard time.
choroba likes the story at the end of the node
[choroba]: reminds me of the days at the bank
[Corion]: Lady_Aleena: Hehe ;-D
[Lady_Aleena]: Corion, it was PerlMonks who kept pushing me to get Linux, so now I know some of the commands to use in word play.
[Corion]: Lady_Aleena: :-D
[Lady_Aleena]: Corion, so do you think the gods would be open to taking over Cookies should I disappear for too long a time?

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2017-04-26 08:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (471 votes). Check out past polls.