sub closure { my $a = $_[0]; return sub { $a += 2 }; } my $first = closure(1); print $first->(), "\n"; # 3 print $first->(), "\n"; # 5 my $second = closure(14); print $second->(), "\n"; # 16 print $first->(), "\n"; # 7 #### 2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$