in reply to Uninitialized value

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Re: Uninitialized value
by CharlesClarkson (Curate) on May 11, 2002 at 13:05 UTC

    Your missing somthing. Test it.

    my $junk; print 1 + ($junk || 0);
    returns 1, no warnings.
    my $junk = 11; print 1 + ($junk || 0);
    returns 12, no warnings.
    my $junk = 0; print 1 + ($junk || 15);
    returns 16, no warnings, not 1 as ravendarke wanted.

    HTH,
    Charles K. Clarkson
    --
    Head Bottle Washer,
    Clarkson Energy Homes, Inc.
    A reply falls below the community's threshold of quality. You may see it by logging in.