What is the purpose and advantages of chomp function. What all can it do? Does using chomp creates any problems? or using chomp after file opening is necessary?
chomp is used to remove the $/
variable which is set to mostly \n
(new line).
$/ is the input record separator, newline by default.
chomp: It returns the total number of characters removed from all its arguments. It's often used to remove the newline from the end of an input record.