open(my $fh, '>', 'file.txt') or die "Cannot open file.txt for writing.\n";