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

Re^2: Why is my code producing weird output?

by BillKSmith (Monsignor)
on Sep 01, 2023 at 18:49 UTC ( [id://11154223]=note: print w/replies, xml ) Need Help??


in reply to Re: Why is my code producing weird output?
in thread Why is my code producing weird output?

When you know that you have windows line separators, I prefer to handle them the same way that perl on windows does. Use the "IO Layer" crlf. Add the statement

binmode STDIN, ':crlf';

before your input loop.
Bill

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11154223]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-06-15 11:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.