open (HAN , ">" ,'D:\RAM\perl\test') or die "$!"; # DELETE the contents of this file and open it while (){ s/e/\*\*/ig; # nothing here to mach, the file is empty, no survivor "e" chars print HAN ; # thus, nothing is changed and nothing left to print to the file }