User Tools

Site Tools


kurs:closure

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:closure [2014/09/10 21:22]
kurs:closure [2014/09/10 21:22] (current)
Line 1: Line 1:
 +<​code>​
 +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();
 +</​code>​
kurs/closure.txt ยท Last modified: 2014/09/10 21:22 (external edit)