In this case, chomp removes 2 bytes at the end of the string (on Windows), the "\r\n" characters.
The behavior of chomp is independent of OS. Perl's I/O operators translate whatever our operating system uses for a newline into a perl newline character. (This conversion is not necessary in UNIX.) Even in windows, The default value for $INPUT_RECORD_SEPARATOR is "\n". As your reference specifies, this is what is removed by chomp.
The only documentation I can find for this is in binmode. The primary purpose of binmode is to turn off the newline translation. Perhaps someone can provide a more direct reference.
In reply to Re^2: confusion with Chomp
by BillKSmith
in thread confusion with Chomp
by Irishboy24
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |