On Tue, Apr 18, 2006 at 02:39:35PM -0700, John W. Krahn wrote: > Chas Owens wrote: > > On 4/18/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: > > snip > >>can anybody plz tell me what i am doing wrong > > snip > > > > What you are doing wrong is making assumptions and not reading the > > documentation. This is being compounded by your inexperience with > > Perl. > > > > First let us tackle the Perl ignorance: true and false are not 1 and > > 0. In fact, there is no one value for either true or false. The > > definition goes something like this: the values literal zero (0), > > undefined (undef), and empty string ('') are false and anything else > > is true. Note that this means the string '0e0' is true even though it > > is numerically equivalent to 0. > > Perl actually has four false values: 0, undef, '' and '0'. One being the > number zero and another a string with a single zero character.
Good point. Thanks for reminding me (us?) of that. I'd forgotten about the string-zero version of "false" somewhere along the way. -- Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ] "The first rule of magic is simple. Don't waste your time waving your hands and hopping when a rock or a club will do." - McCloctnick the Lucid -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>