in reply to Failed to create a file

mkdir('C:/TEMP/cfg') or die 'Could not create folder';