From: Chris Koeritz Date: Fri, 24 Feb 2012 15:32:21 +0000 (-0500) Subject: updated to support 6 digits instead of 4. X-Git-Tag: 2.140.90~1559 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=7160a9d8b361d96926f008bf958ce94a30c6eb09;p=feisty_meow.git updated to support 6 digits instead of 4. --- diff --git a/scripts/math/inc_num.pl b/scripts/math/inc_num.pl index 4746115c..acecc29f 100644 --- a/scripts/math/inc_num.pl +++ b/scripts/math/inc_num.pl @@ -29,6 +29,9 @@ sub get_number { if ($number < 10) { $number = '0'.$number; } if ($number < 100) { $number = '0'.$number; } if ($number < 1000) { $number = '0'.$number; } + # upgraded to 6 digit numbers. whoo hoo. + if ($number < 10000) { $number = '0'.$number; } + if ($number < 100000) { $number = '0'.$number; } close(NUMBERING); return $number; } @@ -37,9 +40,9 @@ sub get_number { sub next_number { local($number_file) = @_; local($number) = &get_number($number_file); - if ($number < 0) { $number = '0000'; } + if ($number < 0) { $number = '000000'; } $number++; - if ($number > 9999) { $number = '0000'; } + if ($number > 999999) { $number = '000000'; } open(NUMBERING, "> $number_file"); #print "number is now $number\n"; print NUMBERING "$number\n";