in reply to It's friday, I can't think.
If you are writing these subroutines yourself, you should
just write to a filehandle. open it somewhere and then
just
If these are subroutines that someone else wrote, and you really don't want to edit them, you could do something likeprint FH $whatever;
This will work provided that the sub doesn't explicitly do print STDOUT.open(FH, "output.txt"); my $oldfh = select(FH); sub_that_writes_to_file(); select $oldfh; # reset to whatever it was close FH;
In Section
Seekers of Perl Wisdom