- or download this
sub populate {
my @array = (...);
return @array;
}
- or download this
# Serializes an array, a hash or a list which contains only
# strings and undefs. Everything else will be stringified.
...
my @array = (...);
return serialize_string_list @array;
}
- or download this
function do_populate_cb(s) {
... do something with s...
}
- or download this
// Deserializes a list serialized with serialize_string_list.
function deserialize_string_list(s) {
...
... do something with array[i]...
}
}