silence un-init string warning
authorJason Etheridge <jason@esilibrary.com>
Thu, 9 Oct 2008 17:56:42 +0000 (17:56 +0000)
committerJason Etheridge <jason@esilibrary.com>
Thu, 9 Oct 2008 17:56:42 +0000 (17:56 +0000)
unicorn_patron_xml2text.pl

index eeb21c7..bd28c12 100755 (executable)
@@ -108,7 +108,7 @@ for my $patron ( $doc->documentElement->childNodes ) {
             foreach my $e ( @addr_elements ) {
                 my $v;
                 if ($e eq "known_bad") {
-                    $v = $addresses{$t}->getAttribute( $e ); $v =~ s/^\s+//; $v =~ s/\s+$//;
+                    $v = $addresses{$t}->getAttribute( $e ); if ($v) { $v =~ s/^\s+//; $v =~ s/\s+$//; }
                 } else {
                     $v = $addresses{$t}->findvalue( $e ); $v =~ s/^\s+//; $v =~ s/\s+$//;
                 }