in reply to Re^3: Override the open builtin globally
in thread Override the open builtin globally

The following open using last version: open(FILE,"> tmp.pm");

Please remember to use three argument open, see open for details

Also use lexicals (my $file) instead of globals (FILE)