* Tom Christiansen ([EMAIL PROTECTED]) [21 Sep 2000 06:09]:
> iain wrote:
> > * Tom Christiansen ([EMAIL PROTECTED]) [21 Sep 2000 05:49]:
> > > >     no strict;
> > > >     $a = undef;
> > > >     $b = null;

> > > Perl already has a null string: "".

> > Looks more like a string of no length than a null string.

> Well, it's not.  That's a null string.  You're thinking of "\0", a
> true value in Perl.

Ah. I wasn't thinking of that, but I had gotten something else confused.
This will teach me to write emails at 6am.

> Here are the canonical definitions:

>     NULL STRING:
>         A string containing no characters, not to be confused with
>         a string containing a null character, which has a positive
>         length.

>     NULL CHARACTER:
>         A character with the ASCII value of zero.  It's used by C
>         and some Unix syscalls to terminate strings, but Perl allows
>         strings to contain a null.

>     NULL LIST:
>         A list value with zero elements, represented in Perl by ().

And a NULL SCALAR:
          A scalar value of no value, as distinct from a scalar value of
          undefined value.


cheers,
-- 
\def\Koschei{Iain Truskett}                    % http://eh.org/~koschei/
\def\WhoAmI#1#2#3#4#5#6{\tt#2#3\it#4#5\bf#6\sl!}\def\i{I}\def\f{i}\def\I
{\if\i\f\f\else\i\fi}\def\Am{am}          \WhoAmI?\I\ \Am\ \Koschei\bye!

Reply via email to