in reply to Code Review Needed!
If I understand what your attempting in main.cgi this snippet:
# Load the keywords used my ($terms, @terms); if ($s->{terms}) { @terms = @{$s->{terms}}; for (@terms) { $terms .= "$_ " } chomp($terms); # for some reason chomp wasn't working here }
might be rewritten:
# Load the keywords used my $terms; if ($s->{terms}) { $terms = join ' ', @{$s->{terms}}; }
but more important is what the code should do if if $s->{terms}is false? Currently strict should throw an error when $terms is used later.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Code Review Needed!
by redsquirrel (Hermit) on Jul 02, 2001 at 15:23 UTC | |
by CharlesClarkson (Curate) on Jul 02, 2001 at 22:20 UTC | |
by redsquirrel (Hermit) on Jul 02, 2001 at 22:58 UTC | |
by CharlesClarkson (Curate) on Jul 03, 2001 at 00:02 UTC |