作者: 104359176 時(shí)間: 2016-08-24 19:09
寫了太多無用的代碼, 只希望能寫點(diǎn)以后可能用到的代碼.作者: RE_HASH 時(shí)間: 2016-08-25 02:56
該道隔壁去問shell問題:
$> echo $(for i in *scv ; do echo ${i%*.scv}; done)
X1 X22 X4
作者: kingfighters 時(shí)間: 2016-08-25 23:03
頂七樓。。作者: kingfighters 時(shí)間: 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.