Decreasing Cumulative of Frequency Series Using Perl
- by neversaint
I have a data that looks like this:
3
2
1
5
What I want to get is the "decreasing" cumulative of this data
yielding
11
8
6
5
0
What is the compact way of doing that in Perl?