in reply to How to get the variable or function address in memory?

There really is no reason to get at the address from perl. In fact both your examples are completely useless, but I assume that's because they're examples :-) If you want to interface with C code at this low level, you're better off using XS, or Inline::C.

Note that a perl scalar variable is a much more complex data structure than a C string, but both XS and Inline::C can make the conversion (almost) transparant.

updated: corrected typo

  • Comment on Re: How to get the variable or function address in memory?