Hi, as Larry mentioned in another thread that he wants a "different notation for word splitting" (http://www.nntp.perl.org/group/perl.perl6.language/21874), how about that, similar to Haskell's "words" function:
# Str::words should return a list of words, without whitespace. my $str = " hi my name is ingo "; my @words = words $str; say join ",", @words; # "hi,my,name,is,ingo"; # The list returned should contain lvalueable objects (idea courtesy # of wolverian): my $str = " hi my name is ingo "; $str.words .= map:{ ucfirst }; say $str; # " Hi My Name Is Ingo " # Note: The whitespace was preserved! Comments? --Ingo -- Linux, the choice of a GNU | We are Pentium of Borg. Division is futile. generation on a dual AMD | You will be approximated. Athlon! |