Link to home
Create AccountLog in
Avatar of ckaspar
ckaspar

asked on

How would I append one file to another in perl

my $file1 = "cat";
my $file2 = "dog";

How would I append dog to cat?
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
system("cat $file1 $file");  # run unix cat command

system("copy $file1t + $file2"); # or ms-dos version
Avatar of Tintin
Tintin

perl -pe '' dog >>cat

;-)