I prefer setting up the proxy information in the system environment or by modifying %ENV during the script. This provides maximum compatibility for modules like Crypt::SSLeay which would be required for https access but don't pick up the LWP proxy info.