- 论坛徽章:
- 0
|
主要是限制程序执行的最低版本,5.10后还有开启新特性的功能,5.12还会自动开启 strict。
zhlong8 发表于 2011-01-29 14:13 ![]()
呃 我的5.12 好像没有自动打开use strict.
C:\Perl\tmp>perl -v
This is perl 5, version 12, subversion 2 (v5.12.2) built for MSWin32-x86-multi-t
hread
(with 8 registered patches, see perl -V for more detail)
Copyright 1987-2010, Larry Wall
Binary build 1203 [294165] provided by ActiveState http://www.ActiveState.com
Built Dec 9 2010 04:03:28
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
C:\Perl\tmp>more han.pl
use utf8;
use Encode;
$x = '缇庝附鐨勫?鍥?笘鐣?;
if ($x =~ /涓栫晫/) {
print encode("gbk",$x);
}
C:\Perl\tmp>perl han.pl
美丽的家园世界 |
|