I need to know how to customize my own errors in Perl. For instance, here's some code:

```
my $filename = 'filaname1.exe';
print "Copying $filename";
copy("$dir_root\\$filename", "$spcl_dir\\$filename");
if ($? == "0") {
    print " - Success!\n";
}
else { print " - Failure!\n"; }

```

I tried to write this and "catch" the error and print "Failure" when I don't get an exit code of 0, and print "Success" when I do. I need to know how I can customize this; I don't really want to use `die` or anything like that where it will give a somewhat cryptic error (to the end user).

Thanks!