in reply to Chomp is removing the whole word instead of the newline

I am facing issues with perl chomp function ... Could you help me understand what am i doing wrong here.

Well, for some reason, you're not copying the example from the chomp documentation

  • Comment on Re: Chomp is removing the whole word instead of the newline