Some time ago I had this same problem.
The reason for this error is that LWP don't support HTTPS over proxy properly. It establishes TCP connection to a proxy, then creates SSL connection over TCP, and then sends "CONNECT needed-host\r\n" request. With real-world proxies (that is, squid:-), correct sequence is: create TCP connection to proxy, send "CONNECT xyz\r\n", and only then establish SSL connection.
I had a patch for LWP somewhere, but it must be outdated by now. Mail me (igorash at mail.od.ua) and I'll send it to you.
Thanks a lot. I had a feeling the problem was along those
lines. The really insane part is that the script I'm writing
is itself a proxy, so that I can trap netscape's outgoing
requests.