open my $testFH, '>', 'test.txt' or $failed_flag = 1;