#! /usr/bin/perl use strict; use warnings; my @array = qw(zeile1 zeile2 zeile3); open(WRITE,">dateiname.txt") or die $!; print WRITE $_,"\n" for(@array); close WRITE;