in reply to reading in a text file
my $path='/tmp/myfile.txt'; open(F,"$path") or die "Cannot open $!"; while(<F>) {## read each line ## you have the read line in the variable $_ ## you can store it in your hash } close(F); ## iterate over your hash ## check for the existence of the files if (-e $filename) { print "$filename exists!\n"; } ## move the files to the directories ## Check for the return value for errors
|
---|