#!/usr/bin/perl -w
use CGI;
$q = new CGI;
print $q->header;
print $q->start_html("SIRA Workshop Registrants");
print $q->h1("SIRA Workshop Registrants");
if( open( PART, ">>participants.txt")){
close PART;
open (PART,"participants.txt");
@parts=();
while( !eof(PART) ) {
my $x = new CGI(PART);
$s = $x->param("ln") . ", " . $x->param("fn") . " : " . $x->param("in");
push(@parts,$s);
#print $s,"
";
}
@parts = sort @parts;
foreach $i (@parts) { print "$i
\n"; }
print $q->end_html;
}else{
print "cannot open file.
";
}