perlfunc Describes both chop and chomp, with good examples and excellent detailed explanations.
in reply to chop() and chomp()
I downvoted the tutorial, because it adds nothing to the existing documentation and thus only makes things harder for beginners.
- Why did you use $a instead of $_?
- print Doesn't return it's given attributes, it returns true if succesful. All your "would return" comments are wrong.
- You didn't even chomp arrays or hashes.
2;0 juerd@ouranos:~$ perl -e'undef christmas'