Atom, correct. When inputting via STDIN, hitting enter places a n on the end of your string, which must be chomp'd.
No, if the last character of the string matches what $/ is set to, it will be removed when chomp is called. $/ is set to n by default, but can be changed by the programmer if need be.
so if I have two strings:
$s1 = "My name is Markn";
$s2 = "blah blah blah";
chomp $s1;
will remove the n.
chomp $s2;
will do nothing to the string
--mark
------------------