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

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