Help for this page

Select Code to Download


  1. or download this
    unless ($query->param('is_a_chicken')) # Fails on 0
    {
         print "You must choose an option.<BR>\n";
    }
    
  2. or download this
    unless (length $query->param('is_a_chicken'))
    {
         print "You must choose an option.<BR>\n";
    }
    
  3. or download this
    my $is_a_chicken = $query->param('is_a_chicken');
    unless (defined ($is_a_chicken) && length ($is_a_chicken))
    {
         print "You must choose an option.<BR>\n";
    }
    
  4. or download this
    sub provided
    {
         return defined($_[0]) && length ($_[0]);
    }
    
  5. or download this
    unless (provided ($query->param('is_a_chicken'))
    {
         print "You must choose an option.<BR>\n";
    }