Perl 5, 27 32 22 bytes
{{open my$h,'>o'}redo} If simply changing the modification timestamp of a file suffices...
Quick explanation:
{ # Braces implicitly create/mark a loop. { # They also create closures, for `my` variables. open my $filehandle, '>', 'o'; # Writing to file "o". # close $filehandle; # Called implicitly when # variable gets destroyed. } # $filehandle gets destroyed because there are no references to it. redo; # ...the loop. } Previous solution (32 bytes): {{open my$h,'>o';print$h 1}redo}
Edit: {open F,'O';print F 1;redo} ← Didn't test the code before posting; now I had to correct it.