- or download this
put_string_ref( \(get_string()) ); # pass return value of get_string()
put_string_ref( \(&get_string) ); # pass a coderef pointing to &get_s
+tring
- or download this
\&func # gives you a reference to a function
\func() # gives you a reference to the return value of func
- or download this
sub func { "the string"; }
print \&func, "\n"; # prints CODE(0x814d990)
print \func(), "\n"; # prints SCALAR(0x813aa8c)