#!/usr/bin/perl use strict; use warnings FATAL => qw(all); use Inline 'C'; use Devel::Peek; my $test = eg(); Dump( $test ); $test = undef; __DATA__ __C__ SV *eg () { HV *rv = newHV(); hv_store(rv, "x", 1, newSVpv("hello", 0), 0); return newRV_noinc((SV*)rv); }