An anonymous subroutine that grabs lexical variables from its containing environment is a closure. Remember that it does not just take a snapshot of the value at the instant the anonymous subroutine is seen.
# declare an anonymous subroutine, and return a reference to it.
my $foo = 10;
$rs = sub {
print "Foo is $foo\n"; # Grabs $foo
};
&$rs(); # Call the closure through the reference