From 36c54ad253745c4223948cb00f6535efafc85bd5 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 24 Apr 2007 10:58:04 +0000 Subject: [PATCH] Kosmetik: Formatoptionen nutzen, anstatt den Formatstring extra zusammenzusetzen. --- SL/Form.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index 98b2a4e4d..45fd48ed2 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2358,7 +2358,7 @@ sub update_defaults { $sth->finish; if ($var =~ /^(.*?)(\d+)$/) { - my $new_num = sprintf '%0' . length($2) . 'd', $2 + 1; + my $new_num = sprintf '%0*d', length($2), $2 + 1; $var = "${1}${new_num}"; } else { $var++; @@ -2395,7 +2395,7 @@ sub update_business { if ($var ne "") { if ($var =~ /^(.*?)(\d+)$/) { - my $new_num = sprintf '%0' . length($2) . 'd', $2 + 1; + my $new_num = sprintf '%0*d', length($2), $2 + 1; $var = "${1}${new_num}"; } else { $var++; -- 2.20.1