eval { require '/home/path/to/upgrade/files/my_code.conf'; }; if ($@) { warn "The require of 'my_code.conf' failed. Here's why: $@\n"; }