> On 18 May 2017, at 11:08, Shlomi Fish <shlo...@shlomifish.org> wrote: > On Thu, 18 May 2017 00:56:42 -0700 > ToddAndMargo <toddandma...@zoho.com> wrote: >> On 05/18/2017 12:22 AM, ToddAndMargo wrote: >>> Any of you guys have a favorite way to remove all >>> spaces from a string? (Otherwise I will use a regex.) >> I like this. Any objections to it? >> perl6 -e 'my $x="1234, 5678"; $x ~~ tr/ //; say $x;' >> 1234,5678 > There are other whitespace characters in ASCII and in unicode than just ' ' > (or > '\x20') - \t, \v, \n, etc. How do you wish to handle them?
Please note that you could add all of the other whitespace characters you wish to remove from the string: $ 6 'my $a = "abcdefgh"; $a ~~ tr/fedcba//; dd $a' Str $a = “gh" Liz