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
In reply to Re: reading in a text file
by mkirank
in thread reading in a text file
by bzenker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |