http://qs321.pair.com?node_id=555810


in reply to need help understanding perl syntax

$ENV{"http_proxy"} retrieves the environment variable http_proxy, splits it into a non-whitespace section and a numeric section separated by a ':'. These sections are assigned to $host and $port.

Just a guess, but have you tried upper-casing "HTTP_PROXY" in the code?

UPDATE: See phaylon's response below. I didn't spot that trailing slash in your data. If your data will always have the slash, you can do:my($host,$port) = ($ENV{"http_proxy"} =~ /^(\S+)\:(\d+)\/$/); to account for it.