#!/usr/bin/perl use strict; use warnings; use Devel::Size 'total_size'; use Devel::Peek; my $a = \"$$"; my $b = \""; my $c = \do {my $foo}; print total_size($a), "\n"; print total_size($b), "\n"; print total_size($c), "\n"; print "-----\n"; print Dump($a); print Dump($c); __END__ 30 25 12 ----- SV = RV(0x81c1df4) at 0x8191e58 REFCNT = 1 FLAGS = (PADBUSY,PADMY,ROK) RV = 0x8184180 SV = PV(0x8184494) at 0x8184180 REFCNT = 1 FLAGS = (POK,pPOK) PV = 0x8189cf8 "23192"\0 CUR = 5 LEN = 6 SV = RV(0x81c1dfc) at 0x8191eac REFCNT = 1 FLAGS = (PADBUSY,PADMY,ROK) RV = 0x8191f84 SV = NULL(0x0) at 0x8191f84 REFCNT = 2 FLAGS = (PADBUSY,PADMY)