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


in reply to Re: if(my) scope
in thread if(my) scope

Although I am sure you are right, how come:
use strict; use warnings; use Devel::Peek; my $true = 1; my $ref; if ($true) { my $fred = 42; $ref = \$fred; } print Dump($$ref);
Gives:
SV = IV(0x3b2e0) at 0x3b2e4 REFCNT = 1 FLAGS = (PADMY,IOK,pIOK) IV = 42
A reference count of 1, not 2?