Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Folks,
Whats a nice one liner for adding a column of figures using perl ?
I'm not particularly happy with my solution
perl -ple '$sum=$_+$sum;$_=$sum;'|tail -1
but it works and reflects my baby-perl nicely.
I need some enlightenment to reach my next perl karma.
I'm not particularly happy with my solution
perl -ple '$sum=$_+$sum;$_=$sum;'|tail -1
but it works and reflects my baby-perl nicely.
I need some enlightenment to reach my next perl karma.
Back to
Seekers of Perl Wisdom