
perl
文章平均质量分 65
帅86
这个作者很懒,什么都没留下…
展开
-
perl中uc,lc,ucfirst,lcfirst的用法(转载)
在perl中,我们可以通过uc,lc,\U,\L来修改变量的大小写。其中uc,\U是将变量中的字母全部转换为大写,对应的lc和\L是将变量中的字母全部转换为小写。如果我们只想将变量的首字母大写或将变量的首字母小写,我们可以使用perl提供给我们的另外两个函数ucfirst和lcfirst来实现,下面我们来看一个具体的例子:#! /usr/bin/perluse strict;use w转载 2016-01-11 16:47:11 · 923 阅读 · 0 评论 -
perl chop和chomp函数区别
没有使用chomp:#!/bin/perlprint "Please input an string and a number by order!n"; $the_string=; $the_numb=; print "The result is n"; print "$the_string"x"$the_转载 2016-01-11 16:51:51 · 605 阅读 · 0 评论