package FOO; { my $name = "InterGuru"; sub get_name { return $name ;} } #note that $name no longer exists when you leave the block, but it is preserved #in the sub # Using a sub to preserve a value that would ordinaraly go out of scope is a closure. #later from anywhere. print &FOO::get_name, "\n";