$q = new CGI; my $val = $q->param('val') || 'default'; # but this does not work as you might expect my @vals = $q->param('val') || ('default');