Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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]
[erix]: be systematic and start with the Edda (untranslated, please) :P
[shmem]: ;-)
[choroba]: also, you get stronger by carrying the rune stones along
[erix]: haha
[karlgoethebier]: shmem: This repertoire is a real challenge.
Discipulus mwhwhaa..
[Discipulus]: sucked in traslation.. was'nt a movie?
[karlgoethebier]: adds "Der abenteuerliche Simplicissimus" by Hans Jakob Christoffel von Grimmelshausen

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (14)
As of 2017-05-24 08:00 GMT
Find Nodes?
    Voting Booth?