[note: for some reason, your perl script came through
(at least on my email client) as an attachment. if you
can stop that happening, that would be nice.]

-------------

> for ($i=0; $b[$i] != undef; $i++)

!= is a numeric comparison.

Line 1544 of list is:

    #stopped at 867

and in perl's book, that isn't a number.


> for ( $i = 0; !!$b[$i] ; $i++)

! alone, is a generic 'not'. It is neither a numeric nor
a string operator.

!! is redundant. It means 'not not'. You can just leave it out:

    for ($i=0; $b[$i]; $i++)

In general:

    1. If you just want an obvious "is this thing set?", just
    say things like:

        if ($foo)

    2. Don't do comparisons with undef. If you really need
    to test the definedness of something (not something
    you really need to do much as a beginner), say
    something like:

        if (defined $foo)

Reply via email to