#!/usr/bin/perl use strict; use warnings; my ($dir,$file) = @ARGV; system('cat $dir/*.txt > $file');