# drei.cgi
use CGI;
use JSON;
my $cgi = new CGI();
my $choice = $cgi->param('choice');
my $rating = $cgi->param('rating');
my $a_ref = decode_json $choice;
my $name = $a_ref->[1];
my $table = $a_ref->[-1];
print $cgi->header();
print $cgi->start_html();
print $cgi->p( "Table: $table
Name: $name
RATING: $rating" );
print $cgi->end_html();