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