Not a perl answer, but maybe it helps?
If you run the program on some flavour of UNIX, there should be a tee command which should do exactly what you requested:
/path/to/my/command -o ptions | tee /path/to/logfileIn reply to Re: STDOUT to multiple files
by Skeeve
in thread STDOUT to multiple files
by perl_lover
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |