humane: fix uninitialized-value warnings
authorZygo Blaxell <zblaxell@hungrycats.org>
Sat, 27 Mar 2010 01:25:25 +0000 (21:25 -0400)
committerZygo Blaxell <zblaxell@faye.furryterror.org>
Sat, 27 Mar 2010 01:28:49 +0000 (21:28 -0400)
...such as these:

Use of uninitialized value $3 in concatenation (.) or string at ./faster-dupemerge line 668, <FIND> chunk 156.

Reported by Lenny Foner.

faster-dupemerge

index ef86fbb4898306a0d0805cf49679c3758424120e..075f0c7c7cb3db23aea8ea0f8633eed443de4842 100755 (executable)
@@ -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;
        }