preprocess
preprocess copied to clipboard
Change split_single_document to work on STDIN & STDOUT
Single document splitting just directly goes from Perl's STDIN to STDOUT now. In multidoc mode I locally override STDIN and STDOUT to point to variables.
I still buffer a single document in multidoc mode because I didn't see an easy way to stream base64 without re-implementing base64-encode in Perl. Piping it through base64
with open()
would work, but that would entail forking for every document.
Fixes #30. Also fixes a warning printed by $text = $text.$words[$i]
when dealing with an empty line in -k
mode.