use warnings; use strict; use File::Copy qw(copy); if (copy('applicants.txt', $targetfile)) { print "success\n"; } else { print "failure\n"; }