eval { copy($fileOne,$fileTwo) or die "Failed to copy $fileOne to $fileTwo - $!"; }; if ($@) { # Record the log information in here exit 1; }