Write to a file

Author: Scott Penrose

Source code: 01-write-to-file.pl

#!/usr/bin/env perl6

use v6;

my $tempfile = open('output.txt', :w);
$tempfile.print("Hello world\n");
$tempfile.close;