in reply to Re: math mistake?
in thread math mistake?

my $numberset = param('value'); if ($numberset eq "") { $numberset = 1; } elsif ($numberset eq 0) { $numberset = 1; }

Rather than testing for string emptiness and numerical zero, you could change the above snippet to one simple line. It will catch undefined, empty string, or number zero:

my $numberset = param('value') || 1;


If the above content is missing any vital points or you feel that any of the information is misleading, incorrect or irrelevant, please feel free to downvote the post. At the same time, please reply to this node or /msg me to inform me as to what is wrong with the post, so that I may update the node to the best of my ability.