http://www.perlmonks.org?node_id=1067860


in reply to Text merge concept in perl

Or this one-liner (I am merging here all the a*.pl files in my current directory into out.txt):
$ perl -pe '' a*.pl > out.txt
Just a quick check on the number of lines and characters:
$ wc out.txt 186 583 4219 out.txt $ wc a*.pl 11 27 187 a.pl 35 125 719 add2.pl 11 47 305 analyse_fable.pl 25 95 502 any.pl 24 99 532 any2.pl 24 55 357 aoh.pl 56 139 1617 array_hash.pl 186 587 4219 total