Hi All,

wander_ over on the chat line helped me figure out a
vexing problem.

I needed to replace each individual leading space
in a line.  Not remove all the leading white space or
replace it with a single character.  Each space had
to be replaced with a sequence of characters and
leave the spaces between character alone.


$ perl6 -e 'my $x=" abc d e "; $x ~~ s:g/^^(" ")+ /{" "x$/[0].elems}/; say $x;'

   abc  d   e


My head is still spinning those guys are so smart...

-T

Reply via email to