#
ÀÚ²Ù ¿ä·± ¿¡·¯°¡ ¾ÆÆÄÄ¡ ·Î±×¿¡ ³²´Âµ¥..
Prototype mismatch: sub main::decode ($$;$) vs none
decode´Â sub decode¶ó°í ÀÖ½À´Ï´Ù.
($$;$) vs none À̺κÐÀÌ ¹«½¼¼Ò¸°Áö ¸ð¸£°Ú¾î¿ä ¤Ð¤Ð
#
Prototype mismatch: sub main::decode ($$;$) vs none at ./sub.cgi ¸®ÆÛ·¯:ºñ¹Ð
subÀÇ ¹®Àںκп¡¼ ¿À·ù°¡ ³ª°íÀִµ¥.
¼¹ö ÀÌÀüÇϱâ Àü¿¡´Â ¾È±×·¨°Åµç¿ä;;
¿ÖÀÌ·¯Áö???
sub decode{
if ($ENV{'REQUEST_METHOD'} eq "POST") {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
}else{$buffer = $ENV{'QUERY_STRING'}; }
@buffer = split(/&/, $buffer);
foreach (@buffer) {
($na, $val) = split(/=/, $_);
$val =~ tr/+/\ /;$val =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$val =~ s/</</g;$val =~ s/>/>/g;$val =~ s/\n//g;
$val =~ s/=/=/g;$val =~ s/&/&/g;
if ($na eq "message") {
$val =~ s/\r\n/<br>/g;
$val =~ s/\r/<br>/g;
$val =~ s/\n/<br>/g;
} else {
$val =~ s/\r//g;
$val =~ s/\n//g;
}
$in{$na} = $val;
}
}