foreach $param ($cgi->param) { if ($param =~ /^abc_/) { $hashref->{$param} = ['column', 'text']; } }