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

\p{Zs} or \p{Space_Separator}: a whitespace character that is invisible, but does take up space.
  • Comment on Re: How to remove trailing white space when =~ s/\s+$//g; doesn't work