in reply to return a reference to the result of a function

No, but if you just want $ref to be a reference to an array of the values returned then try:

$ref = [ split(//, "tempfoo") ];