Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I do not understand the above code. Both "host" and "port" are undefined after the above statement is executed. http_proxy is set to "http://my.proxy.example.com:8080/". I am trying to understand what is expected behavior of above code. And why is "host" and "port" not being set? I have not encountered this syntax before. Thanks, Anandmy($host,$port) = ($ENV{"http_proxy"} =~ /^(\S+)\:(\d+)$/);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: need help understanding perl syntax
by phaylon (Curate) on Jun 16, 2006 at 15:17 UTC | |
|
Re: need help understanding perl syntax
by socketdave (Curate) on Jun 16, 2006 at 15:08 UTC | |
|
Re: need help understanding perl syntax
by sgifford (Prior) on Jun 16, 2006 at 15:41 UTC | |
|
Re: need help understanding perl syntax
by mikeock (Hermit) on Jun 16, 2006 at 15:17 UTC | |
|
Re: need help understanding perl syntax
by Anonymous Monk on Jun 17, 2006 at 10:34 UTC | |
by phaylon (Curate) on Jun 17, 2006 at 14:50 UTC | |
by holli (Abbot) on Jun 20, 2006 at 08:52 UTC |