Closures capture lexical variables
sub make_function {
my $val = shift;
return sub { print "Value is $val.\n"; ++$val };
}
my $f1 = make_function(3); my $f2 = make_function(20);
Code is shared, pads separate
Pad memory allocated and reclaimed at run time as usual