There was a thread here the other day that got lost with the recent crash.
If I remember correctly, the question was what exactly does chomp do? This answers given were only partially right.
Chomp removes the last character of a string, if that character matches what $/ set to. $/ is set to n by default, so when you see chomp $myvar it is looking to remove a n from the end. If the end is not a n, nothing gets removed. This differs from chop in that the last characer, no matter what it is, is removed by chop.
If you have slurped an entire file into an array and want to remove the n from each element, simply doing chomp @myarray will take care of that.
perldoc -f chomp for more information
--mark
------------------