Problems? Is your data what you think it is? | |
PerlMonks |
Re: Re: japhygesisby srawls (Friar) |
on Jun 22, 2001 at 21:59 UTC ( [id://90803]=note: print w/replies, xml ) | Need Help?? |
Nice, too few people realise that you can just return a string to evaluate as zero, but still be true. I often return things like "0 but true" when I want the 0 value to be true; that way you can return 0 on errors too. A little trick I picked up was if you need to print the value, you can just use "0\0" It's 0 plus the null character, so it's true, but it only prints 0.
The 15 year old, freshman programmer,
In Section
Meditations
|
|