Is it really throwing the error with the google url or was that just a change for posting? What happens if you run the above script from the command line? Do you still get the 500? The 500 error *should* be from the server the url points to and I have a hard time believing google is throwing a 500.
The only *recent* LWP upgrade issue that I can think of is the SSL validity check on https -- but that would throw an entirely different error I believe.