⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch17.htm

📁 CGI programming is the hottest stuff to look out for in this book
💻 HTM
📖 第 1 页 / 共 5 页
字号:
            chop;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@shortline
= split(/\t/);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if
( ($shortline[0] eq $field[0]) &amp;&amp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;($shortline[1]
eq $field[1]) ) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$stdev
+= ($shortline[2] - $average)**2;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$n++;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;close(CDD);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$stdev = ($stdev / $n)**0.5;
<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$shortcutname = &amp;hash($field[0],$field[1]);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TD ALIGN=LEFT
VALIGN=TOP&gt;&lt;A NAME=\&quot;$shortcutname\&quot;&gt;$field[0]&lt;/A&gt;&quot;,
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;&lt;/TD&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TD ALIGN=LEFT
VALIGN=TOP&gt;$field[1]&lt;/TD&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TD ALIGN=LEFT
VALIGN=TOP&gt;$field[3]&lt;/TD&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;&lt;TD ALIGN=LEFT
VALIGN=TOP&gt;%5.2f&lt;/TD&gt;\n&quot;,$field[4]/$field[3]);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;&lt;TD ALIGN=LEFT
VALIGN=TOP&gt;%7.4f&lt;/TD&gt;&lt;/TR&gt;\n&quot;,$stdev);<BR>
&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;/TABLE&gt;\n&quot;;<BR>
<BR>
#<BR>
# Now, output a graph of how many votes an artist got... I'm not
sure<BR>
# what the statistical significance of this would but, but it'll
look cool,<BR>
# and also show how graphs can be produced<BR>
#<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;H3&gt;Graph of Vote Points Per
Artist&lt;/H3&gt;\n&lt;PRE&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;$maxkeylength = -1;<BR>
&nbsp;&nbsp;&nbsp;foreach ( @line ) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@field = split(/\t/,$_,5);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$votes{$field[0]} += $field[4];
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$maxkeylength = length($field[0])
if length($field[0]) &gt; $maxkeylength;<BR>
&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;$maxvotes = -1;<BR>
&nbsp;&nbsp;&nbsp;foreach ( values(%votes) ) { $maxvotes = $_
if $_ &gt; $maxvotes; }<BR>
&nbsp;&nbsp;&nbsp;foreach ( sort by_votes keys(%votes) ) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;%${maxkeylength}s&nbsp;&nbsp;:
&quot;,$_);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$i = 1;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$numstars = 30 * $votes{$_}
/ $maxvotes;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$numstars = int(++$numstars)
if ( ($numstars - int($numstars)) &gt;= 0.5);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while ( $i &lt;= $numstars
) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;*&quot;;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$i++;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot; $votes{$_} vote
points\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;print &lt;&lt;END;<BR>
&lt;/PRE&gt;<BR>
&lt;P&gt;<BR>
Return to &lt;A HREF=$ref_url&gt;Home Page&lt;/A&gt;<BR>
&lt;/BODY&gt;&lt;/HTML&gt;<BR>
END<BR>
}<BR>
<BR>
sub reg_user {<BR>
<BR>
#<BR>
# - open user file corresponding to the email address / password
pair provided<BR>
# - display error page if file can't be found or email/password
don't match<BR>
# - create @userfile array containing each line in the .cdd data
file <BR>
#<BR>
&nbsp;&nbsp;&nbsp;$userfilename = $tokens{'password'} . '.cdd';
<BR>
&nbsp;&nbsp;&nbsp;&amp;password_error if ( !(-e $userfilename)
);<BR>
&nbsp;&nbsp;&nbsp;open(UF,$userfilename);<BR>
&nbsp;&nbsp;&nbsp;chop(@userfile = &lt;UF&gt;);<BR>
&nbsp;&nbsp;&nbsp;close(UF);<BR>
&nbsp;&nbsp;&nbsp;($email,$passwd) = splice(@userfile,0,2); #
remove 1st 2 entries<BR>
&nbsp;&nbsp;&nbsp;($discard,$keep) = split(/\t/,$email);<BR>
&nbsp;&nbsp;&nbsp;&amp;password_error if ( $tokens{'email'} ne
$keep);<BR>
&nbsp;&nbsp;&nbsp;@userfile = sort @userfile;<BR>
<BR>
#<BR>
# Construct @line array of all entries and @shortlist array for
shortlisted<BR>
# entries.&nbsp;&nbsp;Then, sort these two arrays alphabetically
<BR>
#<BR>
&nbsp;&nbsp;&nbsp;open(CD,&quot;cd.txt&quot;);<BR>
&nbsp;&nbsp;&nbsp;while ( &lt;CD&gt; ) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chop;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@field = split(/\t/,$_,5);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;push(@line,$_);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;push(@shortlist,$_) if $field[2]
eq '*';<BR>
&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;close(CD);<BR>
&nbsp;&nbsp;&nbsp;@line = sort @line;<BR>
&nbsp;&nbsp;&nbsp;@shortlist = sort @shortlist;<BR>
<BR>
&nbsp;&nbsp;&nbsp;print &quot;Content-type: text/html\n\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;HTML&gt;\n&lt;HEAD&gt;&lt;TITLE&gt;Here
is your voting profile&lt;/TITLE&gt;&lt;/HEAD&gt;\n&quot; ,<BR>
&nbsp;&nbsp;&nbsp;&quot;&lt;BODY&gt;\n&lt;H3&gt;Voting Profile
of user &lt;I&gt;$tokens{'email'}&lt;/I&gt;&lt;/H3&gt;\n&quot;
,<BR>
&nbsp;&nbsp;&nbsp;&quot;&lt;P&gt;To re-cast or remove votes, use
the appropriate selection menus &quot; ,<BR>
&nbsp;&nbsp;&nbsp;&quot; and submit the form.\n&quot;;<BR>
<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;FORM ACTION=$ref_url METHOD=POST&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;INPUT TYPE=HIDDEN NAME=\&quot;email\&quot;
VALUE=$tokens{'email'}&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;INPUT TYPE=HIDDEN NAME=\&quot;password\&quot;
VALUE=$tokens{'password'}&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;INPUT TYPE=SUBMIT NAME=\&quot;submit\&quot;
VALUE=\&quot;Submit these Votes\&quot;&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;INPUT TYPE=RESET VALUE=\&quot;Reset
form to its original values\&quot;&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;P&gt;&lt;TABLE BORDER&gt;\n&quot;;
<BR>
<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;TR&gt;&lt;TH VALIGN=TOP NOWRAP
COLSPAN=3&gt;Short-listed Albums currently&quot;,<BR>
&nbsp;&nbsp;&nbsp;&quot; Voted Upon&lt;/TH&gt;&lt;/TR&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;TR&gt;&lt;TH VALIGN=TOP NOWRAP&gt;Artist&lt;/TH&gt;&lt;TH
VALIGN=TOP NOWRAP&gt;Album&quot;,<BR>
&nbsp;&nbsp;&nbsp;&quot;&lt;/TH&gt;&lt;TH VALIGN=TOP&gt;Your Vote&lt;/TH&gt;\n&quot;;
<BR>
<BR>
#<BR>
# The following loop goes through all entries in the userfile
which <BR>
# correspond with short-listed entries in the album database 
<BR>
#<BR>
&nbsp;&nbsp;&nbsp;foreach $userline ( @userfile ) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@field = split(/\t/,$userline);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$shortflag = 0;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach $shortentry ( @shortlist
) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@shortfield
= split(/\t/,$shortentry,5);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ( ($shortfield[0]
eq $field[0]) &amp;&amp; ($shortfield[1] eq $field[1]) ) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$shortflag
= 1;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$shortentry
= 'DONE';<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$userline
= 'DONE';<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next if $shortflag == 0;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TR&gt;\n&lt;TD
ALIGN=LEFT VALIGN=CENTER NOWRAP&gt;$field[0]&lt;/TD&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TD ALIGN=LEFT
VALIGN=CENTER NOWRAP&gt;$field[1]&lt;/TD&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$namehash = &amp;hash($field[0],$field[1]);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TD ALIGN=LEFT
VALIGN=CENTER&gt;&lt;SELECT NAME=$namehash&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;OPTION&gt;[remove
vote]&lt;/OPTION&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$select{$field[2]} = ' SELECTED';
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for $i (0..10) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;OPTION$select{$i}&gt;$i&lt;/OPTION&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;undef(%select);<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;/SELECT&gt;&lt;/TD&gt;&lt;/TR&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;}<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TR&gt;&lt;TH VALIGN=TOP
NOWRAP COLSPAN=3&gt;Other Short-listed Albums&quot;,<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&quot;&lt;/TH&gt;&lt;/TR&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TR&gt;&lt;TH VALIGN=TOP
NOWRAP&gt;Artist&lt;/TH&gt;&lt;TH VALIGN=TOP NOWRAP&gt;Album&quot;,
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&quot;&lt;/TH&gt;&lt;TH VALIGN=TOP&gt;Your
Vote&lt;/TH&gt;\n&quot;;<BR>
<BR>
#<BR>
# do the same for each short-list item not already encountered,
as marked<BR>
# by the DONE flag... notice that now I don't have to use any
special<BR>
# code to determine what OPTION to mark as SELECTED<BR>
#<BR>
&nbsp;&nbsp;&nbsp;foreach ( @shortlist ) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next if $_ eq 'DONE';<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@field = split(/\t/,$_,5);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TR&gt;\n&lt;TD
ALIGN=LEFT VALIGN=CENTER NOWRAP&gt;$field[0]&lt;/TD&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TD ALIGN=LEFT
VALIGN=CENTER NOWRAP&gt;$field[1]&lt;/TD&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$namehash = &amp;hash($field[0],$field[1]);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TD ALIGN=LEFT
VALIGN=CENTER&gt;&lt;SELECT NAME=$namehash&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;OPTION SELECTED&gt;[no
current vote]&lt;/OPTION&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for $i (0..10) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;OPTION&gt;$i&lt;/OPTION&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;/SELECT&gt;&lt;/TD&gt;&lt;/TR&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;}<BR>
<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;TR&gt;&lt;TH VALIGN=TOP NOWRAP
COLSPAN=3&gt;Long-listed Albums currently&quot;,<BR>
&nbsp;&nbsp;&nbsp;&quot; Voted Upon&lt;/TH&gt;&lt;/TR&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;TR&gt;&lt;TH VALIGN=TOP NOWRAP&gt;Artist&lt;/TH&gt;&lt;TH
VALIGN=TOP NOWRAP&gt;Album&quot;,<BR>
&nbsp;&nbsp;&nbsp;&quot;&lt;/TH&gt;&lt;TH VALIGN=TOP&gt;Your Vote&lt;/TH&gt;\n&quot;;
<BR>
<BR>
#<BR>
# do the same for already voted-upon long-listed entries... all
short-listed <BR>
# entries will be listed as DONE so skip<BR>
#<BR>
&nbsp;&nbsp;&nbsp;foreach $userline ( @userfile ) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next if $userline eq &quot;DONE&quot;;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@field = split(/\t/,$userline);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$userline = &quot;DONE&quot;;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach $entry ( @line ) {
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@entryfield
= split(/\t/,$entry,5);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ( ($entryfield[0]
eq $field[0]) &amp;&amp; ($entryfield[1] eq $field[1]) )<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ $entry
= &quot;DONE&quot;; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TR&gt;\n&lt;TD
ALIGN=LEFT VALIGN=CENTER NOWRAP&gt;$field[0]&lt;/TD&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TD ALIGN=LEFT
VALIGN=CENTER NOWRAP&gt;$field[1]&lt;/TD&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$namehash = &amp;hash($field[0],$field[1]);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;TD ALIGN=LEFT
VALIGN=CENTER&gt;&lt;SELECT NAME=$namehash&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;OPTION&gt;[remove
vote]&lt;/OPTION&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$select{$field[2]} = ' SELECTED';
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for $i (0..10) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;OPTION$select{$i}&gt;$i&lt;/OPTION&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;undef(%select);<BR>
 <BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;&lt;/SELECT&gt;&lt;/TD&gt;&lt;/TR&gt;\n&quot;;
<BR>
&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;TR&gt;&lt;TH VALIGN=TOP NOWRAP
COLSPAN=3&gt;Other Long-listed Albums&quot;,<BR>
&nbsp;&nbsp;&nbsp;&quot;&lt;/TH&gt;&lt;/TR&gt;\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;print &quot;&lt;TR&gt;&lt;TH VALIGN=TOP NOWRAP&gt;Artist&lt;/TH&gt;&lt;TH
VALIGN=TOP NOWRAP&gt;Album&quot;,<BR>
&nbsp;&nbsp;&nbsp;&quot;&lt;/TH&gt;&lt;TH VALIGN=TOP&gt;Your Vote&lt;/TH&gt;\n&quot;;
<BR>
<BR>
#<BR>
# do the same for not voted-upon long-listed entries... all short-listed
<BR>
# and voted-upon entries will be listed as DONE so skip... note,
no fancy<BR>
# code to determine which OPTION to mark as SELECTED<BR>
#<BR>
&nbsp;&nbsp;&nbsp;foreach $entry ( @line ) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next if $entry eq &quot;DONE&quot;;
<BR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -