# copy.pl my $test = system('perl', 'write.pl'); my $file1 = 'foo.txt'; my $status = system("cp $file1 file2");