From a20bcb4d51f52c78700de2bdd99569ee37a40480 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 14 Jan 2005 09:52:42 +0000 Subject: [PATCH] Do not print meta section for empty titles --- test/dmoz/con1.pl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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"; + } } } -- 1.7.10.4