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.
There may be standard unix tools to do the same thing, but this is just as easy for me.perl -lne'$x+=$_}{print$x' # sum perl -lne'$x+=$_}{print$x/$.' # avg
blokhead
|
---|
In Section
Seekers of Perl Wisdom