in reply to Re: Lexical variables questionin thread Testing for filled-in box with CGI::param() ?
In addition to davorg's valid criticism, your if ($var) test is less-than-optimal if zero is a valid value for the param, which it probably is...