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

Re^3: odd behavior with DATA section

by TilRMan (Friar)
on Jul 23, 2005 at 06:52 UTC ( #477435=note: print w/replies, xml ) Need Help??

in reply to Re^2: odd behavior with DATA section
in thread odd behavior with DATA section

Gather more data about what perl is doing. Print out the value of $line, paying close attention to the line ending. Save the return value of chomp $line, print it, and see if it is what you expect.

Replies are listed 'Best First'.
Re^4: odd behavior with DATA section
by Nkuvu (Priest) on Jul 25, 2005 at 17:30 UTC
    Printed out the value of $line before and after chomp-ing, and it looked just like I expected. With a single newline before, and no newline after. The return value of chomp is the number of things chomped, so I expected a 1. I got a 1. No surprises there.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (12)
As of 2016-10-24 15:47 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (309 votes). Check out past polls.