gszczesz has asked for the wisdom of the Perl Monks concerning the following question:
Passing the standard data such as ints, longs, doubles and strings is easy. What I can't figure out is how to receive and then send to the Perl program references.
For example, my perl code returns a hash reference. I tried having my perl program send it to my C++ program as a string, and it comes as HASH(0xXXXXX). When the C++ sends a string SV with that value back to the perl, it doesn't work. I tried having the Perl program send the SV as a long. When my C++ program sends it back to the perl program, I also ran SvRV_on to mark that the data is an RV. That didn't work either. In short, knowing that a particular RV can be represented as HASH(0xXXXXX), how can I create a new SV to become an RV pointing to that hash??? Greg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to extract/set RV information?
by Marshall (Canon) on Jun 09, 2009 at 05:45 UTC | |
by gszczesz (Novice) on Jun 09, 2009 at 13:19 UTC | |
by Marshall (Canon) on Jun 09, 2009 at 14:35 UTC |