2009年11月5日星期四

Why ADSL is better than DSL for PERL_UNICODE

% echo 调查资料 | perl -e 's{@{[shift @ARGV]}}{INFO} && print $_ while (<STDIN>)' 资料
调查INFO

% echo 调查资料 | perl -e 's{资料}{INFO} && print $_ while (<STDIN>)'
调查INFO

% echo 调查资料 | PERL_UNICODE=DSL perl -e 's{资料}{INFO} && print $_ while (<STDIN>)'

% echo 调查资料 | PERL_UNICODE=DSL perl -e 's{@{[shift @ARGV]}}{INFO} && print $_ while (<STDIN>)' 资料

% echo 调查资料 | PERL_UNICODE=ADSL perl -e 's{@{[shift @ARGV]}}{INFO} && print $_ while (<STDIN>)' 资料
调查INFO

没有评论: