in reply to Auto-detecting returned or passed variable type

Obviously the correct way would be always to pass Function A a reference to whatever Function B returned, but how can I create the reference to it when I don't know what it's going to be?
You don't have to know what it's returning to take a reference to it:funcA(\funcB());will pass a single reference (scalar) to whatever funcB returns.

Update
The note below is correct. Ignore this.

Replies are listed 'Best First'.
Re^2: Auto-detecting returned or passed variable type
by richard5mith (Beadle) on Aug 19, 2004 at 20:14 UTC
    Not if funcB returns a list. Then funcA would get a single reference to the last item in the list. Not to the whole list.
      Are you sure?
      $ perl -e " sub a{return (1,2)} sub b{print scalar @_, map $$_, @_} b(\a());"
      prints 212