in reply to Re: How to remove last character of a line
in thread How to remove last character of a line

Note that both chomp() and chop() modify their argument in-place and return the removed character.

No, only chop returns the removed character. chomp returns the total number of characters removed.

Edit: Made first sentence more specific.

  • Comment on Re^2: How to remove last character of a line