if(eval { # Do stuff }, $@) { # Handle any errors }