$filetemp =~ s/./kopie./;
This is the code for replacing the ".". It should find a "." and replace it with "copy."