#!/usr/bin/perl $getresult = "/home/taka/public_html/game/harapeko/getresult.sh"; sub decode { local($args, $n_read, *terms, $value, $tag); if ($ENV{'REQUEST_METHOD'} eq "POST") { $n_read = read(STDIN, $args, $ENV{'CONTENT_LENGTH'}); } else { $args = $ENV{'QUERY_STRING'}; } @terms = split('&', $args); foreach (@terms) { ($tag, $value) = split(/=/, $_, 2); $value =~ s/\+/ /g; $value =~ s/%(..)/pack("c", hex($1))/ge; # &jcode'convert(*value, 'euc'); $tags{$tag} = $value; } } sub printheader { print < はらぺこカエルランキング
はらぺこカエルランキング

それぞれのレベルでの現在のランキングは以下のようになっています。

OUT } sub printresult { $result = `$getresult`; print $result; } sub printfooter { print < OUT } ############# # Main Part # ############# &decode(); &printheader(); &printresult(); &printfooter();