in reply to Re^3: Cannot open file within a loopin thread Cannot open file within a loop
thanks a lot !! I just added $dir to $file and it worked :)