in reply to Re: checking for overlap
in thread checking for overlap

If you're on a system that uses "\r\n" for line termination (i.e. windows), "chop" will only take away the "\n", leaving "\r", whereas "chomp" will take away both.

Wrong. If you are Win32, then "\r\n" is used for line termination in files and the record you read in (unless you did binmode) will end with just "\n". $/ starts out as "\n" everywhere. See Re^4: Line Feeds (rumor control) for more on this.

The reason chomp is preferred to chop for this is because chop will remove the last character of the line even if it isn't a newline.

                - tye