perl -ne "BEGIN{open FH,'>>', shift @ARGV or die $!} print FH $_;" A.txt B.txt