use Filter::tee 'filename' ; use Filter::tee '>filename' ; use Filter::tee '>>filename' ;
By default and when the filename is prefixed with a '>' the output file will be emptied first if it already exists.
If the output filename is prefixed with '>>' it will be opened for appending.
This filter is useful as a debugging aid when developing other source filters.