User Tools

Site Tools


kurs:closure
use strict;
use warnings;

{
  my $i;
  sub count {
    return $i++;
  }
}

printf "c: %d\n", count();
printf "c: %d\n", count();
printf "c: %d\n", count();
kurs/closure.txt · Last modified: 2014/09/10 21:22 (external edit)