PetaMem has asked for the wisdom of the Perl Monks concerning the following question:
from time to time the following happens to sneak into my code. Itīs easy: Just flipflop a boolean value.
Canīt say why, but this seems unelegant to me. Is there any (or more) more elegant way to do this?if($debug eq FALSE) { $debug = TRUE; } else { $debug = FALSE; }
Oh and BTW: Why doesnīt he accept TRUE or FALSE if "use strict" is .. err ... used?
Yeah and while I am at it. Why does one need "eq"? Isnīt true/false a numerical value? Guess Iīm thinking C again...
Ciao
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Flip Flop IV
by bikeNomad (Priest) on Jun 24, 2001 at 21:39 UTC | |
by grinder (Bishop) on Jun 25, 2001 at 16:58 UTC | |
|
Re: Flip Flop IV
by japhy (Canon) on Jun 24, 2001 at 22:41 UTC | |
|
Re: Flip Flop IV
by Beatnik (Parson) on Jun 24, 2001 at 21:44 UTC | |
|
Re: Flip Flop IV
by holygrail (Scribe) on Jun 24, 2001 at 21:59 UTC | |
|
Re: Flip Flop IV
by MeowChow (Vicar) on Jun 24, 2001 at 23:59 UTC | |
|
Re: Flip Flop IV
by PetaMem (Priest) on Jun 24, 2001 at 21:45 UTC | |
by Beatnik (Parson) on Jun 24, 2001 at 21:54 UTC | |
|
(tye)Re: Flip Flop IV
by tye (Sage) on Jun 25, 2001 at 09:07 UTC |