mrguy123 has asked for the wisdom of the Perl Monks concerning the following question:
What the code does is not very important, but the fact is that when I change the switch to "if" and comment out the "use switch" line, the program works. I have used switches in other programs, and would like to know what is the cause of this problem, and where and when it might apear again? Any ideas?switch($proxy_type){ case 'SQUID' { $web_proxy = $proxy_address; } case 'EZPROXY' { if ($proxy_credentials){ ($user_name, $password) = split /\//, $proxy_credentials; $prefix = $proxy_address."user=$user_name&pass=$password&url=" ; } else { $prefix = $proxy_address."url="; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: problems with the "switch" module
by Fletch (Bishop) on Jul 10, 2006 at 15:22 UTC | |
by mrguy123 (Hermit) on Jul 11, 2006 at 06:38 UTC | |
|
Re: problems with the "switch" module
by Zaxo (Archbishop) on Jul 10, 2006 at 17:07 UTC | |
by CountZero (Bishop) on Jul 10, 2006 at 18:20 UTC | |
|
Re: problems with the "switch" module
by planetscape (Chancellor) on Jul 10, 2006 at 17:34 UTC | |
|
Re: problems with the "switch" module
by kwaping (Priest) on Jul 10, 2006 at 15:23 UTC | |
|
Re: problems with the "switch" module
by pjf (Curate) on Jul 11, 2006 at 00:29 UTC |