![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
perl
seu_noop
这个作者很懒,什么都没留下…
展开
-
Read the Last line in a file
http://code.activestate.com/lists/perl-unix-users/189/open(FILE, "my_file.txt") or die;$pos = -2; # Use this to get past EOF and last newlinewhile($char ne "\n"){ seek FILE, $pos, 2;转载 2016-07-15 12:53:57 · 202 阅读 · 0 评论 -
Perl中chomp和chop的区别介绍
http://www.jb51.net/article/33968.htmchomp是用来删除换行符,chop是用来删除最后一个字符chomp是用来删除换行符.复制代码代码如下:#!/usr/bin/perl $c="abcde"; chomp($c); print "$c\n"; [root@ak]# per转载 2016-07-15 13:21:18 · 680 阅读 · 0 评论