sub make_hello { #define a sub that makes a closure
    my $message = shift; #what are we instructed to remember
    return sub { print "$message\n"; } 
        #return a reference to this sub
}

my $print_hello = make_hello("hello world"); #set the literal
$print_hello->();  #hello world

$print_hello = make_hello("HELLO WORLD"); #change it, 
    # make a new reference
$print_hello->(); #HELLO WORLD
