From 7160a9d8b361d96926f008bf958ce94a30c6eb09 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Fri, 24 Feb 2012 10:32:21 -0500 Subject: [PATCH] updated to support 6 digits instead of 4. --- scripts/math/inc_num.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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"; -- 2.34.1