Help for this page
sub create_closure { my ($obj) = @_; ... my $sub = create_closure($existing_obj); } &$sub(); # Prints 1234, even though $existing_obj is out of scope.
our $global_obj; ... my $sub = sub { print($global_obj, $/); }; $global_obj = 5678; &$sub(); # Prints 5678.