In an here document you don't need to escape quotes.
Inside your here document you missed the closing tag for the table.
If you want to print a string that contains double quotes you might use single quotes for that string eg:
print '<tr><td><a href="'.$rank{$_}{url}.'"><center><b>';
please correct your line as you omitted the ' for the hits:
for (sort {$rank{$b}{'hits'} <=> $rank{$a}{'hits'}} keys %rank)

Have a nice day
All decision is left to your taste
Update
as far as I came with it. Better try to use cgi.pm. It is easy and helps you a lot.
#!/usr/bin/perl -w use strict; my $memberListFile = "members.txt"; my $hits; my %rank; my $user; my $email; my $username; my $sitename; my $url; my $button; my $desc; print "Content-type:text/html\n\n"; open(USERS, $memberListFile) die ("can't open $memberListFile: $!"); while(<USERS>) { chomp; # ah, cleverly working on $_ ($user,$email) = split(/\|/); my $USR; # better find some naming conventions, for me looks this +like a CONSTANT in the source $user .= ".txt"; # still ugly, but better compose filenames before + using them (makes debugging easier) open (USR,"$user") or die ("can't open $user: $!"); $USR = <USR>; # scalar context ? why? do all these files only have + one line? close(USR); ($username, $sitename, $url, $email, $button, $desc, $hits) = spli +t(/\|/, $USR); $rank{$username} = { 'url' => $url, 'email' => $email, 'button' => $button, 'desc' => $desc, 'hits' => $hits, 'sitename' => $sitename, 'user' => $username }; } print <<eof; <font face="verdana" color="black"> <table WIDTH="75%" border="1" bordercolor="black" cellSpacing="0" cell +Padding="0" align="center"> <tr bgcolor="#000080"> <th> <font face="verdana" color="white"> Site </font> </th> <th> <font face="verdana" color="white"> button </font> </th> <th> <font face="verdana" color="white"> Hits </font> </th> </tr> eof foreach (sort {$rank{$b}{'hits'} <=> $rank{$a}{'hits'}} keys %rank) { # oh ouh here it is not clever to work with $_ print <<eof; <tr> <td align="center"> <b> <a href="$rank{$_}{url}"> $rank{$_}{sitename} </a> <br /> <font face="verdana" size="1"> $rank{$_}{desc} </font> </b> </td> <td align="center" width="88"> <img src="$rank{$_}{button}" height="31" width="88"> </td> <td align="center"> $rank{$_}{hits} </td> </tr> eof } print "</table>\n</font>";

In reply to Re: erm... I need help! by little
in thread erm... I need help! by perlcoder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.