当前位置:首页 » Perl » Perl lc()函数

Perl lc()函数

perl lc()函数例子,lc()函数学习例子,lc()函数实例代码,lc()函数在线教程等

语法

lc EXPR

lc


定义和用法

返回EXPR一个小写版本,或如果EXPR被忽略则为$_。

返回值

    EXPR的小写版本

例子

试试下面的例子,复制和过去的这个例子test.pl文件,然后对结果进行验证:

#!/usr/bin/perl

$orig_string = "This is Test and CAPITAL";

$changed_string = lc( $orig_string );

print "Changes String is : $changed_string\n";

It will produce following result
#by www.gitbook.net
Changes String is : this is test and capital