Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^5: How can I print all lines?

by SuicideJunkie (Vicar)
on Aug 10, 2017 at 15:00 UTC ( #1197177=note: print w/replies, xml ) Need Help??

in reply to Re^4: How can I print all lines?
in thread How can I print all lines?

Step 1: What exactly is it you don't like? (CRLF in the middle of your print)

Step 2: Where in the code does it do that? (Somewhere between printing the text of the line and printing the IN or OUT, conveniently, this is on the same line so you don't have to look very far.)

Step 3: Consider what it is doing there. Add debug prints to make clear what your variables are at that point. (There's a \n before your \tIN... and the $column[$number] is the thing before the \t... print "-=)$column[$number](=-";? Well, that will prove that you've got a CRLF in there.)

Step 4: Understand. The CRLF is in your string because every line of your file ends with a CRLF, of course!

Step 5: Fix it. chomp was made for this.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2021-03-04 22:58 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (108 votes). Check out past polls.