eval { $object->method($foo) } if (@$) { ... handle error ... }