使用了unpack得到的是hex,不知道hex 2 dec的函数
或者你知道更好的方法请告知
至于module encode 不知道如何使用
enfant 回复于:2003-05-27 16:27:28
自己搞定了
#!/usr/bin/perl -w
use strict;
my $str='我';
print hex(unpack("H*",$str)),"\n";
得到的就是内码+65536得值
deathcult 回复于:2003-05-27 18:23:35
hex() is hex to dec actually.
|