foreach $ ($query->param){ @a = $query->param($key); if (@a > 1){ $a = $query->param($key) } }