in reply to Re: Code Review Needed!
in thread Code Review Needed!

What is the best way to keep these 'uninitialized' errors from appearing? When I declare my $terms, should I set it to empty quotes or is there a better way?

Thanks for the help,

Dave Hoover
"Twice blessed is help unlooked for." --Tolkien
http://www.redsquirreldesign.com/dave

Replies are listed 'Best First'.
Re: Code Review Needed!
by CharlesClarkson (Curate) on Jul 03, 2001 at 00:02 UTC

    Either that or use a default value

    # Load the keywords used my $terms = ''; if ($s->{terms}) { $terms = join ' ', @{$s->{terms}}; }
    or:
    # Load the keywords used my $terms = 'some default value'; if ($s->{terms}) { $terms = join ' ', @{$s->{terms}}; }

    Or, even better might be to allow Soapbox.pm to handle undef values


    HTH,
    Charles K. Clarkson