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

Re: Problems with seemingly simple string matching...

by boftx (Deacon)
on Oct 05, 2013 at 00:09 UTC ( #1056957=note: print w/replies, xml ) Need Help??

in reply to Problems with seemingly simple string matching...

This is just a guess at this point (just got off work and I'm still sober), and I probably ought to double check the man page, but I'm pretty sure that chomp() will remove only a single whitespace character from the end of the line. Even though the \r\n pair might be considered a single char in other contexts, it is two distinct characters so far as chomp() is concerned.

Update: Well, I guess I just stuck my foot in my mouth. I just checked the man page and it says:

This safer version of chop removes any trailing string that corresponds to the current value of $/ (also known as $INPUT_RECORD_SEPARATOR in the English module).

So kindly disregard my guess. :)

On time, cheap, compliant with final specs. Pick two.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1056957]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2018-01-22 03:37 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (231 votes). Check out past polls.