in reply to Getting the PV pointer from a SV
Use pack 'p'
use Devel::Peek;; $s = 'Hello, world!';; Dump $s;; SV = PV(0x25c0b0) at 0x3d71b48 REFCNT = 1 FLAGS = (POK,pPOK) PV = 0x3d5e908 "Hello, world!"\0 CUR = 13 LEN = 16 print unpack 'V', pack 'p', $s;; 64350472 printf "%x\n", unpack 'V', pack 'p', $s;; 3d5e908
|
|---|