Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: What one-liners do people actually use?

by blokhead (Monsignor)
on Dec 08, 2005 at 20:55 UTC ( #515377=note: print w/ replies, xml ) Need Help??


in reply to What one-liners do people actually use?

I sometimes use these oneliners to add or average a list of numbers from STDIN.

perl -lne'$x+=$_}{print$x' # sum perl -lne'$x+=$_}{print$x/$.' # avg
There may be standard unix tools to do the same thing, but this is just as easy for me.

blokhead


Comment on Re: What one-liners do people actually use?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (15)
As of 2014-10-21 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (103 votes), past polls