in reply to Re: uninitialized variables
in thread uninitialized variables

$variable ||=0;
Perl golf!

-fuzzyping

Replies are listed 'Best First'.
Re: Re: Re: uninitialized variables
by strat (Canon) on Mar 29, 2002 at 12:25 UTC
    > $variable ||=0;

    This will work as long as $variable is not an empty string. I think, in perl6 there will be something like
    $variable //= 0;
    just for cases like that.

    Best regards,
    perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[^\w]~~g=>chop,print"