in reply to Testing Return Values

If you want something that looks like your copy("applicants.txt","$targetfile") or die "Copy failed: $!"; with a  { do_something } block instead of die you could write copy("applicants.txt","$targetfile") or do { do_something }.

If do_something is a simple statement and not a block, you may even just write copy("applicants.txt","$targetfile") or do_something;