in reply to Re: Re: static-like persistence of my variable due to trailing conditional
in thread static-like persistence of my variable due to trailing conditional

I vaguely recall reading something about the duality of run-/compilation timeness of my causing this. Unless I'm off by several orbits, the cause was that the scope is determined at compilation time, but the actual scalar is allocated at runtime, and is the same thing as causes $bar to persist in things like
sub foo { my $bar = 0; sub baz { print $bar++; } }
(You know the drill - Variable "$bar" will not stay shared.)

Makeshifts last the longest.

  • Comment on Re^3: static-like persistence of my variable due to trailing conditional
  • Download Code