pat_mc has asked for the wisdom of the Perl Monks concerning the following question:
Esteemed Monks,
I am having some trouble trying to print the actual contents of a specific memory address. Essentially, I am trying to emulate C-type pointer dereferencing with basic Perl commands (rather than any specially designed modules). While I can easily obtain the memory address of a given variable,
Any help with this would be much appreciated.
Kind regards -
Pat
I am having some trouble trying to print the actual contents of a specific memory address. Essentially, I am trying to emulate C-type pointer dereferencing with basic Perl commands (rather than any specially designed modules). While I can easily obtain the memory address of a given variable,
I do not know how to print the contents of a given memory address (e.g., '0xe98af0'). I am sure there is an easy way to do it in Perl but I haven't been able to find it.perl -e '$a=5;printf "%p\n", $a'
Any help with this would be much appreciated.
Kind regards -
Pat
Back to
Seekers of Perl Wisdom