#!/usr/bin/perl use strict; use warnings; open my $fh, '>', 'foo.txt' or die $!; for (1..10) { print $fh "$_ Perl slogan: Easy things should be easy,"; print $fh " and hard things should be possible.\n"; } close $fh;