Surprising. Opening a file in ">>" mode should create the file if it does not exist. And it does. Just opening the file without even doing anything to it (not trying to write anything) creates an empty file:
$ perl -e 'open my $fh, ">>", "bar.txt" or die "can open file $!"; '