# $string is an apr_string_t my $var; { my $pool = new SVN::Pool(); $var = apr_pstrdup($string, $pool); } print $var;