+val av_empty : unit -> av
+(** Create an empty [AV] (array). *)
+val av_of_sv_list : sv list -> av
+(** Create an array from a list of [SVs]. *)
+val av_push : av -> sv -> unit
+(** Append the [SV] to the end of the array. Same as Perl
+ * [push \@av, $sv]. *)
+val av_pop : av -> sv
+(** Remove the [SV] at the end of the array and return it. Same as
+ * Perl [$sv = pop \@av]. *)
+val av_shift : av -> sv
+(** Remove the [SV] at the beginning of the array and return it. Same as
+ * Perl [$sv = shift \@av]. *)
+val av_unshift : av -> sv -> unit
+(** Prepend the [SV] to the start of the array. Same as Perl
+ * [unshift \@av, $sv]. *)
+val av_length : av -> int
+(** Return the length of the [AV]. *)
+val av_set : av -> int -> sv -> unit
+(** Replace the i'th element of the [AV] with [SV]. *)
+val av_get : av -> int -> sv
+(** Get the i'th element of the [AV]. *)
+val av_clear : av -> unit
+(** Remove all elements from the [AV]. Same as Perl [\@av = ()]. *)
+val av_undef : av -> unit
+(** Delete the [AV] (and all elements in it). Same as Perl [undef \@av]. *)
+val av_extend : av -> int -> unit
+(** Extend the [AV] so it contains at least [n+1] elements. Note that
+ * this apparently just changes the amount of allocated storage. The
+ * extra elements are not visible until you store something in them.
+ *)
+val av_map : (sv -> 'a) -> av -> 'a list
+(** Map a function over the elements in the [AV], return a list of the
+ * results. *)
+val list_of_av : av -> sv list
+(** Convert an [AV] into a simple list of [SV]s. *)
+val av_of_string_list : string list -> av
+(** Build an [AV] from a list of strings. *)
+
+val hv_empty : unit -> hv
+(** Create an empty [HV] (hash). *)
+val hv_set : hv -> string -> sv -> unit
+(** Store the given [SV] in the named key in the hash. *)
+val hv_get : hv -> string -> sv
+(** Return the [SV] at the key in the hash. Throws [Not_found] if no key. *)
+val hv_exists : hv -> string -> bool
+(** Return true if the hash contains the given key. Same as Perl [exists]. *)
+val hv_delete : hv -> string -> unit
+(** Delete the given key from the hash. Same as Perl [delete]. *)
+val hv_clear : hv -> unit
+(** Remove all elements from the [HV]. Same as Perl [%av = ()]. *)
+val hv_undef : hv -> unit
+(** Delete the [HV] (and all elements in it). Same as Perl [undef %hv]. *)
+val hv_of_assoc : (string * sv) list -> hv
+(** Create an [HV] directly from an assoc list. Perl hashes cannot
+ * support multiple values attached to the same key, so if you try
+ * to provide an assoc list with multiple identical keys, the results
+ * will be undefined.
+ *)
+val assoc_of_hv : hv -> (string * sv) list
+(** Take an [HV] and return an assoc list. *)
+val hv_keys : hv -> string list
+(** Return all the keys of an [HV]. *)
+val hv_values : hv -> sv list
+(** Return all the values of an [HV]. *)
+
+(* The following are the low-level iteration interface to hashes,
+ * which you probably shouldn't use directly. Use {!hv_keys},
+ * {!assoc_of_hv}, etc. instead. See [perlguts(3)] if you really
+ * want to use this interface.
+ *)
+type he
+val hv_iterinit : hv -> Int32.t
+val hv_iternext : hv -> he
+val hv_iterkey : he -> string
+val hv_iterval : hv -> he -> sv
+val hv_iternextsv : hv -> string * sv
+
+val get_sv : ?create:bool -> string -> sv
+ (** Return a scalar value by name. For example, if you have a symbol
+ * called [$a] in Perl, then [get_sv "a"] will return its value.
+ *
+ * If the symbol does not exist, this throws [Not_found].
+ *
+ * If the optional [?create] argument is set to true and the symbol does
+ * not exist, then Perl will create the symbol (with value [undef]) and
+ * this function will return the [SV] for [undef].