$ perl -MDevel::Peek -e'my $x = 123; Dump($x); $x = "abc"; Dump($x);'
SV = IV(0x2764760) at 0x2764770
REFCNT = 1
FLAGS = (IOK,pIOK)
IV = 123
SV = PVIV(0x2766c38) at 0x2764770
REFCNT = 1
FLAGS = (POK,IsCOW,pPOK)
IV = 123
PV = 0x27c1258 "abc"\0
CUR = 3
LEN = 10
COW_REFCNT = 1
####
Head Body
+---------------+ +---------------+
| Ptr to body -------> | IV/UV slot |
+---------------+ +---------------+
| Ref count |
+---------------+
| Flags & type |
+---------------+
| Unused |
+---------------+
##
##
Head Body
+---------------+ +---------------+
| Ptr to body -------> | Unused |
+---------------+ +---------------+
| Ref count | | Unused |
+---------------+ +---------------+
| Flags & type | | Unused |
+---------------+ +---------------+
| Unused | | Unused |
+---------------+ +---------------+
| IV/UV slot |
+---------------+
##
##
+ - - - - - - - +
¦ Unallocated ¦ <--+
Head +---------------+ |
| Ptr to body -------+
+---------------+
| Ref count |
+---------------+
| Flags & type |
+---------------+
| IV/UV slot |
+---------------+