Strip extra spaces from code.
[voro++.git] / branches / dynamic / scripts / sum.pl
blob64dc0674267134adb3b0fe9e565f6c60804812a0
1 #!/usr/bin/perl
2 # This script will take a .vol file created by voro++, and it will sum up the
3 # volumes of all the Voronoi cells. In many cases, this will equal the volume
4 # of the container, and it can be a useful check.
6 # It assumes that the volume is stored in the final column, so it works with
7 # both regular and polydisperse calculations.
9 open A,"@ARGV[0]" or die "Can't open input file";
10 while(<A>) {
11 @A=split;
12 $c+=pop @A;
14 print "$c\n";