#!/usr/bin/perl use strict; use warnings; open my $fh, '>', 'array.out' or die "Could not create the file.\n"; my @array = ('one','two','three','four','five'); print $fh "@array"; close $fh;