my @price; foreach($q->keywords()){ if($_ =~ m/^preis(\d+)/){ $preis[$1] = $q->param($_); } }