in reply to redirecting function output

You can localize the STDOUT filehandle and change the typeglob...
open(FOO,">/temp/foo") || die $!; sub foo { local *STDOUT=*FOO; print "foo"; } #yes, this is supposedly +to STDOUT foo; close(FOO);
Similar would be something like :
*FOO=*STDOUT; #Save it somehow open(STDOUT,">>outputfile") || die $!; sub foo { print "foo bar"; } foo; close(STDOUT); *STDOUT=*FOO;

Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.