$mech->get($url); if ($mech->response->is_success) { print $mech->response->content; # or whatever } else { die $mech->response->status_line; }