in reply to Re: Cannot open file within a loop
in thread Cannot open file within a loop

$file is in $dir
but the error message spits out 'sequence.fa which is the correct name

Replies are listed 'Best First'.
Re^3: Cannot open file within a loop
by huck (Prior) on Jun 14, 2017 at 07:36 UTC

    it is the correct name if you were in $dir, but you are not, you are in the directory that contains $dir arnt you?

    So from the directory containing dir, what is the correct name for the file

      thanks a lot !! I just added $dir to $file and it worked :)