求助:php程序用perl写出来

来源:百度知道 编辑:UC知道 时间:2024/06/07 09:39:07
以下就是要翻译过来的php程序,请大牛们帮帮忙了:)

<?php
mb_internal_encoding( 'utf-8' );
header( 'Content-type: text/plain; charset=utf-8' );

$method = $_SERVER['REQUEST_METHOD'];

echo "{ method=$method }";
?>

PERL没有mb_internal_encoding这些东西,其余内容翻译如下:

#!c:/perl/bin/perl.exe
print "Content-type: text/html; charset=utf-8\n\n";
$method=$ENV{'REQUEST_METHOD'};
print "{method=$method}";