sub unindent; # declare unindent proto at top of code so we can use it as a bareword sub return_html { my %include = %{$_[0]}; open(FH,"/home/coolsite/www/top.html") || die "couldn't open file $!"; my @html=; close(FH); my %titles = %{$_[1]}; my $results; foreach my $key (keys %include) { if ($include{$key} eq 'yes') { $results .= "
  • $titles{$key}
  • "; } } print unindent <<" HTML"; # print all the stuff until we find HTML on a line by itself Content-type: text/html @html

    Search Results

    RESULTS- In No Particular Order:





    This search powered by
    \"Got
    HTML # herepage ends with token above } # this sub strips all leading whitespace sub unindent { s/^[ \t]+//gm for @_; @_; }