in reply to Re: How to remove trailing white space when =~ s/\s+$//g; doesn't work
in thread How to remove trailing white space when =~ s/\s+$//g; doesn't work

Look more closely. The variable he's trying to remove a visible space from -- which apparently is only printing as a space but is some other invisible-at-the-terminal, non-space character -- is being interpolated into another string for printing. The string into which that variable is being interpolated is the one with the square brackets.
  • Comment on Re^2: How to remove trailing white space when =~ s/\s+$//g; doesn't work