var %i = 1
; find all matching vars
while $var(%me*,%i) {
; hadd them (you can remove the -m switch, it only makes sure the hash table is open.
; - $mid($v1,2) removes the first char from the varname (the "%")
; - $($v1,2) is the vars value
hadd -m tablename $mid($v1,2) $($v1,2)
inc %i
}
unset %me*