Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^3: print in CMD window

by BillKSmith (Monsignor)
on Sep 16, 2021 at 15:33 UTC ( [id://11136832] : note . print w/replies, xml ) Need Help??

in reply to Re^2: print in CMD window
in thread print in CMD window

Thank you pryrt. Your second example is exactly what I asked for in my first post. I have already extended it to test newlines by appending \n to the input string and \r\n to the expected output string (and removing chomp). My project started as a minor annoyance and ended with a one-line solution. I never dreamed that in between, I would need to learn details of windows (including a reference to an old DOS manual to get started), Unicode, and even perl (I have never used a child process).