#!/usr/bin/perl
use strict;
use warnings;
open FILE, ">output.txt" # Create the file "output.txt"
or die "Could not create file: $!"; # in the current directory
print FILE "Hello there\n"; # Print a string to the file
close FILE # Close the file
or die "Could not close file: $!";