At some point in history, Paul Hodges wrote (in part):

ph> So a null byte is still Boolean true.  Ugh, yarf, ack, etc.

No.  And it never has been (at least in my world view).  However, asking
that question explains some things.  See below for more.

ph> But as long as I know -- easy enough to check explicitly.

ph> But just tell me this....am I the only guy who thinks this *feels*
ph> wierd? Understanding the reason doesn't make it any more
ph> ~comfortable~.

I believe, from the way you asked your question, that you don't have the
right mental map to make it comfortable.  As I see it, at least, with
respect to what you're asking about testing, Perl has strings and
integers, but not 'characters'.  (And see another p6l thread about
graphemes and language-dependence and bytes, etc., for why that's a Good
Thing(TM).)

For example, take this test in C:

        if ('\0') ...

It corresponds to this in Perl:

        if ord "\0" {...}

Consider this test in Perl:

        if "\0" {...}

Its equivalent in C is this:

        if ("") ...

You need ord() for character/grapheme/byte/whatever testing that's
equivalent to what C does.  Since C doesn't really have strings, and Perl
does, this is just one of those differences between the languages where
(essentially, and perhaps abusing some linguistics theory and terminology)
you've run into a 'false cognate'.

Hope this helps,
        --s.

-- 
Spider Boardman (at home)                     [EMAIL PROTECTED]
The management (my cats) made me say this.    http://users.rcn.com/spiderb/
PGP public key fingerprint: 96 72 D2 C6 E0 92 32 89  F6 B2 C2 A0 1C AB 1F DC

Reply via email to