Mercurial > hg > batmud > misc
changeset 46:c8c2c545fa63 misc
Count number of found combinations.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 20 Apr 2009 18:11:41 +0000 |
parents | b94ffda8cb46 |
children | 766e37b24a91 |
files | materials/parsealloys.pl |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/materials/parsealloys.pl Mon Apr 20 16:16:17 2009 +0000 +++ b/materials/parsealloys.pl Mon Apr 20 18:11:41 2009 +0000 @@ -132,6 +132,7 @@ print ");\n\n". "?>"; } else { + my $num = 0; foreach my $min1 (sort { $a cmp $b } keys %final) { foreach my $min2 (sort { $a cmp $b } keys %{$final{$min1}}) { printf "%-35s = ", $min1." + ".$min2; @@ -142,6 +143,8 @@ } if ($n > 1) { print " (unstable)"; } print "\n"; + $num++; } } + print "\n$num alloys total.\n"; }