特定のファイル名を持つファイルを、移動元フォルダーから特定の移動先フォルダーに、別の移動先フォルダーに、アルファベット順に、たとえば 5 分ごとに 1 つずつ移動する必要があります。
これは私がこれまでに思いついたものです...
#!/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;
今の問題は、それらをアルファベット順に1つずつ移動できないことです...ポインタはありますか? ありがとう