【发布时间】:2013-06-14 16:01:47
【问题描述】:
我需要每隔 5 分钟按字母顺序将具有特定文件名的文件从源文件夹移动到其特定的目标文件夹到另一个文件夹。
这就是我目前想出的......
#!/usr/bin/perl
use strict;
use warnings;
my $english = "sourcepath";
my $destination = "destination path";
#for(;;)
#{
opendir(DIR, $english) or die $!;
while (my $file = readdir(DIR))
{
next unless (-f "$english/$file");
next unless ($file =~ m/english/);
move ("$english/$file", "$destination");
}
closedir (DIR);
#sleep 10;
#}
exit 0;
现在的问题是,我无法按字母顺序一个一个地移动它们...任何指针?谢谢
【问题讨论】:
标签: perl