diff options
Diffstat (limited to 'scripts/stats.pl')
| -rwxr-xr-x | scripts/stats.pl | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/scripts/stats.pl b/scripts/stats.pl index e5cc2b3..38cc67c 100755 --- a/scripts/stats.pl +++ b/scripts/stats.pl @@ -9,7 +9,6 @@ use strict; use scripts::modules::file; my %stats; -my $param = shift; &recursive("."); @@ -18,16 +17,19 @@ $stats{"Lines total"} = $stats{"Lines of source"} + $stats{"Lines of text"} + $stats{"Lines of HTML"}; -unless (defined $param) { - - print "$_ = " . $stats{$_} . "\n" - for ( sort keys %stats ); - -} else { - - print $stats{$_} . " " - for sort keys %stats; - +my $bool = 0; +foreach ( sort keys %stats ) +{ + if ($bool == 0) + { + print "$_ = " . $stats{$_} . "\n"; + $bool = 1; + } + else + { + print "$_ = " . $stats{$_} . "\n"; + $bool = 0; + } } print "\n"; |
