develooper Front page | perl.perl5.porters | Postings from April 2006

Re: [PATCH] t/op/pat.t using test.pl

Thread Previous | Thread Next
From:
demerphq
Date:
April 27, 2006 07:04
Subject:
Re: [PATCH] t/op/pat.t using test.pl
Message ID:
9b18b3110604270704w41d63039y1f72793b3f74eeb5@mail.gmail.com
On 4/27/06, John Peacock <jpeacock@rowman.com> wrote:
> Jim Cromie wrote:
> > <insane>
> >    is there a string equivalent to NaN, that doent match any string, inc
> > (another copy of) itself ?
> > </>
>
> Isn't that a pretty good definition of undef???

Not really:

D:\>perl -e"print undef==0 ? 1 : 0"
1
D:\>perl -e"print undef eq '' ? 1 : 0"
1
D:\>perl -e"print undef eq undef() ? 1 : 0"
1

You are thinking of an SQL null I think. Perls undef doesnt have the
same semantics at all.

Yves


--
perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About