http://www.perlmonks.org?node_id=1060317


in reply to change files names bug

readdir does NOT return the complete path, so 'ACCTGG.fg' is not the same file as 'samplesA/ACCTGG.fg' .