Fork me on GitHub

Perl语言入门--4--函数

1、chop函数:删除标量变量或数组中每个字符的最后一个字

     举个栗子:
          #!/usr/bin/perl
          $v = 'Flowers';
          $r = chop($v);
          print "$v (without $r)\n";

 

posted @ 2017-04-21 15:23  Mo槑  阅读(213)  评论(0编辑  收藏  举报