my $file = 'somefile.txt'; open (THEFILE, ">$file") || die "Could not create $file - $!\n";