chomp will only remove any trailing string that corresponds to the current value of $/ usually the "newline" character whereas chop will remove the last character regardless of what it is. The benifit of using chop is that it is much faster since it does not try to scan the string and match the value of $/
See also chop() and chomp()
<cite>Just a tongue-tied, twisted, earth-bound misfit. -- Pink Floyd</cite>
In reply to Re: When do you use chop insetad of comp?
by data64
in thread When do you use chop instead of chomp?
by Jemts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |