From: Zygo Blaxell Date: Sat, 27 Mar 2010 01:25:25 +0000 (-0400) Subject: humane: fix uninitialized-value warnings X-Git-Tag: dm6-0.20100514~7 X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=dupemerge;a=commitdiff_plain;h=b9a391c55bb9780e30dcee65f6f5898d4272b7e8;hp=f58c1c6b10b0d913ea800ad7440b52d12a89ac52 humane: fix uninitialized-value warnings ...such as these: Use of uninitialized value $3 in concatenation (.) or string at ./faster-dupemerge line 668, chunk 156. Reported by Lenny Foner. --- diff --git a/faster-dupemerge b/faster-dupemerge index ef86fbb..075f0c7 100755 --- a/faster-dupemerge +++ b/faster-dupemerge @@ -665,7 +665,7 @@ if ($humane) { sub space_numbers { my ($num) = @_; - 1 while $num =~ s/(\d)(\d\d\d)( \d\d\d)*$/$1 $2$3/os; + 1 while $num =~ s/(\d)(\d\d\d)((?: \d\d\d)*)$/$1 $2$3/os; $num = ' ' x ($max_num_len - length($num)) . $num; return $num; }