From: Brian Candler Date: 2003-07-15T21:57:31+09:00 Subject: Re: Booleans On Tue, Jul 15, 2003 at 09:25:08PM +0900, ts wrote: > >>>>> "M" == Mark J Reed writes: > > M> my brain can step in and think "But what is Truth? Is Truth > M> unchanging law?" > > > pigeon% perldoc perlfunc > [...] > fcntl FILEHANDLE,FUNCTION,SCALAR > [...] > > You don't have to check for "defined" on the return from > "fnctl". Like "ioctl", it maps a 0 return from the system call > into "0 but true" in Perl. > ^^^^^^^^^^^^ Good point. Certain perl functions return "0E" when they mean "0", so that it can be treated as 'true'. Just remember that Ruby isn't Perl or C. It doesn't take long to get used to it, and you'll find it's much cleaner. After all, why should the number "0" be treated differently from the number "1"? Regards, Brian.