in reply to Length and Chomp ??
I am not sure why I am getting my length as 6 and not 5.
Sometimes, usually on DOS/Windows boxes, the "newline" from input has length of 2 bytes: CR (carriage return or "\r") and LF (line feed or "\n"). chomp eats both at the same time.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Length and Chomp ??
by GrandFather (Saint) on Aug 20, 2009 at 02:30 UTC | |
|
Re^2: Length and Chomp ??
by ikegami (Patriarch) on Aug 22, 2009 at 21:20 UTC |