open(FILE, 'D:\Versuch\demo.dat'); map { s/x/Y/ig } (@tmp = ); open(FILE, '>D:\Versuch\demo.dat'); print FILE for @tmp;