$existref = eval { retrieve($filename) }; if (not $existref) { nice_error_message("Error retrieving data: $@"); }