Hi all,
I guess it was in Modern Perl that I saw this deprecated idiom to
simulate state <http://perldoc.perl.org/functions/state.html>
variables:

sub foo{
   my $initialized_once = 1 if 0;
  ...
}

Now, why is that working and initializing the variable the first time?
I mean, each time such row is evaluated the condition is 0 = false, so
the variable should not be initialized never.
What am I missing?

Thanks,
Luca

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to