use zUtil;


# http://www.refdesk.com/index.html
sub thoughtOfTheDay
{
   my $html = shift;
   my( @rValue ) = ();
   my( $table, $row, $value, $day );
   my( $done );

   print "------------------ thoughtOfTheDay  --------------------\n";
   #print "html: $html";

   #if( $html =~ /Thought.*?of.*?the.*?Day.*?TOTD.*?\>(.*?)\"/gsi )
   if( $html =~ /TOTD START.*?\>(.*?)\<\!\-.*?TOTD END/gsi )
   {
       $value = $1;
       $value =~ s/^\s*//gsi;
       print "found: $value\n";
   }
   else
   {
       $value = "no quote available";
   }

   push @rValue,
   {
       'thought' => $value
   };

   #exit;

   return @rValue;
}

return 1;

