http://www.perlmonks.org?node_id=984280

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,
perl -e '$a=5;printf "%p\n", $a'
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.

Any help with this would be much appreciated.

Kind regards -

Pat