eval { # format_output or get_user may die $formatted_users = format_output(get_users($fh)); } if ( $@ ) { # test the value of $@ to know what's been going on. die $@ }