Fri, Jun 07, 2002 at 11:04:13AM +0200 Alexander Hartmaier wrote about if-elsif problem
>
>
> Hi!
>
> I just discovered a strange behavior of embperl 2.0b7....
"=" is an assignment operator. You should "eq" to compare string values,
and "==" to compare numbers.
>
> I've got following piece of code...
>
> if ($guitype = 'admin')
> {
> $graphdir = "/home/nac/web/admin/intgraph/";
> }
> elsif ($guitype = 'user')
> {
> $graphdir = "/home/nac/web/user/intgraph/";
> }
>
> ...which doesn't work!
>
> If I chance it...
>
> if ($guitype = 'admin')
> {
> $graphdir = "/home/nac/web/admin/intgraph/";
> }
> if ($guitype = 'user')
> {
> $graphdir = "/home/nac/web/user/intgraph/";
> }
>
> ...into 2 seperate if-statements it's working....
>
>
> I thought I should ask if I'm doing something wrong but I think it's ok.
>
> THX Alex
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Best Regards
Vladimir Ivaschenko
http://www.hazard.maks.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]