用win32的internet模块来查看网页源代码

use Win32::Internet;
use Encode;
$INET = new Win32::Internet();
$file = $INET ->FetchURL("http://www.baidu.com");
$b=encode("cp936", decode("utf-8",$file));
print $b;

编程技巧