作者: 104359176 时间: 2016-08-24 19:09
写了太多无用的代码, 只希望能写点以后可能用到的代码.作者: RE_HASH 时间: 2016-08-25 02:56
该道隔壁去问shell问题:
$> echo $(for i in *scv ; do echo ${i%*.scv}; done)
X1 X22 X4
作者: kingfighters 时间: 2016-08-25 23:03
顶七楼!!!作者: kingfighters 时间: 2016-08-25 23:06
The cynical may say "that's just the same as doing this":
my @files;
find( sub { push @files, $File::Find::name if -f && /\.jpg$/ }, $dir );
Sure it is, but File::Find::Wanted makes it more obvious, and saves a line
of code. That's worth it to me. I'd like it if find_wanted() made its way
into the File::Find distro, but for now, this will do.