I was looking at the documentation for chomp and chomp! - and the results of chomp startled me to say the least.

$_ = "now\n"
p chomp
p $_
p chomp "ow"
p $_

printed:

"now"
"now"
"n"
"n"

I would have expected:

"now"
"now"
"ow"
"ow"

Is this not better?

Also, the description for chomp! appears to be the same as for chomp - which it is not after CAREFUL examination.  chop and chop! have the same dubious problem.  It was only after careful reading and realizing that I was reading about Kernel methods and the lookup references referred to String methods....



David Douthitt
CUNA & Affiliates
UNIX Systems Administrator
ddouthitt / cuna.com
(608) 231-4922