AV * array = newAV(); HV * hash = newHV(); // use AV_store() to put something in the array HV_store(hash, "key3", 4, newRV_inc((SV *) array), 0);