For anyone that's interested: while (($key, $value) = each(%query)) { @numkey = split("\x1c", $key); $i = $numkey[0]; $key = $numkey[1]; $windows[$i]{$key} = $value; } does the trick. Regards Chris Marsh