The defined native determines if a scalar value is defined:
print "We received a response from the server.\n" if defined $response;