chop removes the last character from a string and returns it. chomp (option B) specifically removes the input record separator (usually newline) only, making it safer for most use cases. chop is deprecated in favor of chomp for removing trailing newlines.