in reply to Perl only prints complete lines?

You need to turn on autoflushing with $| = 1;. See perlvar

Unless I state otherwise, all my code runs with strict and warnings