From: Adam Dickmeiss Date: Fri, 14 Jan 2005 09:52:42 +0000 (+0000) Subject: Do not print meta section for empty titles X-Git-Tag: snippet.version.1~171 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=a20bcb4d51f52c78700de2bdd99569ee37a40480;p=idzebra-moved-to-github.git Do not print meta section for empty titles --- diff --git a/test/dmoz/con1.pl b/test/dmoz/con1.pl index d2591c3..906eb27 100755 --- a/test/dmoz/con1.pl +++ b/test/dmoz/con1.pl @@ -2,7 +2,7 @@ my $state = 'init'; my $topic = ''; -my $title; +my $title = ''; my $description; while ($_ = ) { @@ -19,11 +19,14 @@ while ($_ = ) { $description = $1; } elsif (/<\/ExternalPage>/) { - print "\n"; - print " $title\n"; - print " $description\n"; - print " $url\n"; - print " $topic\n"; - print "\n"; + if (length($title) > 0) + { + print "\n"; + print " $title\n"; + print " $description\n"; + print " $url\n"; + print " $topic\n"; + print "\n"; + } } }