Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Override "null filehandle"

by BillKSmith (Monsignor)
on Sep 06, 2023 at 14:14 UTC ( [id://11154277] : note . print w/replies, xml ) Need Help??


in reply to Override "null filehandle"

Thanks for all your replies. I believe that any one of them would have solved my problem. A few days ago I wanted to include code in my post Re^2: Why is my code producing weird output?. That code would have made no changes to the OP's code except to add input that explicitly showed the windows line endings. That would have duplicated his problem. Adding binmode STDIN, ':crlf'; would have fixed it. When I could not make the demo work, I settled for the verbal reply. Only later did I think to ask how I might have done it.

Had I known all your answers, I probably would have chosen to close and reopen STDIN because it best describes my intention.

Bill