#!/usr/bn/perl use strict; use warnings; open(my $ofh, '>', 'C:/some/path/filename.txt') or die($!); print $ofh join("\n", @ARGV); close $ofh;