Chop and Chomp

Perl Functions of chop() and chomp()

chop($abc); deletes the last character of $abc.
chomp($xyz); deletes the “new line” character at the end of $xyz if it has.

Often the usage of chomp is like this:
chomp($input = <STDIN>); which equals to $input = <STDIN>; chomp($input);