Help for this page
open my $fh, ">", "./foo.txt" or die( "Couldn't etc." ); ... print $fh "$_\n" for 1..10; close $fh;