If, as seems clear to me from your question, the perl interpreter is embedded within the C++ process who's memory you are trying to access, then it it just a case of making your C++ memory be visible to the interpreter.
The section of perlembed (which you have presumably have read?) entitled "Fiddling with the Perl stack from your C program" would appear to describe what you are looking for.
Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.
| [reply] |
The Advanced Perl Programming might help?<quote of the book>
Perl supports both concepts, and quite well, too. It allows you to create anonygmous data structures, and supports a fundamental data type called a "reference," loosely equivalent to a C pointer. Just as C pointers can point to data as well as procedures, Perl's references can refer to conventional data types (scalars, arrays, and hashes) and other entities such as subroutines, typeglobs, and filehandles. Unlike C, they don't let you peek and poke at raw memory locations.
** Update ** shortened the quote a little. | [reply] |
Another process can not read or write to data of your process. read perlipc. Basicly your tasks can share a special memory area or they talk via pipes. This is not a limitation/feature of perl its your os.
| [reply] |
Did you miss the part where he said his perl interpreter is embedded into his application? Thus, it's all the same process?
-- [ e d @ h a l l e y . c c ]
| [reply] |
No, I understand it that way, that he embed a perl interpreter, that may share with tghe cpp application. But also start scripts, external to the application. The scripts should share something with the cpp application where perl is embedded. Maybe I get it wrong.
| [reply] |
Basically, you'd need to write a piece of XS code (or Inline::CPP code that will be turned into XS for you) that takes the data found on the specific memory location, and turns that in the appropriate Perl datastructure. The Perl API has lots of helper functions to create Perl datastructures. | [reply] |
Like someone had suggested perlipc is the way to go, Look at shared memory .
Any reason why you do not create an Index of the directory/drive (update this frequently) and search from there ? | [reply] |