Would you want to use something else for that, maybe .comb?
From the spec:
'The comb function looks through a string for the interesting bits, ignoring
the parts that don't match. In other words, it's a version of split where you
specify what you want, not what you don't want.'
chris
On Jan 2
On Wed, Jan 27, 2010 at 08:40:48AM -0800, Larry Wall wrote:
> On Wed, Jan 27, 2010 at 01:24:48PM +, Matthew Walton wrote:
> : On Wed, Jan 27, 2010 at 1:19 PM, Carl Mäsak wrote:
> : > Mark (>), Carl (>>):
> : >>> S05 describes tr/// in terms of the .trans function, a handsome but
> : >>> very d
On Wed, Jan 27, 2010 at 01:24:48PM +, Matthew Walton wrote:
: On Wed, Jan 27, 2010 at 1:19 PM, Carl Mäsak wrote:
: > Mark (>), Carl (>>):
: >>> S05 describes tr/// in terms of the .trans function, a handsome but
: >>> very different beast. Specifically, it doesn't seem to have a "scalar
: >>>
On Wed, Jan 27, 2010 at 1:19 PM, Carl Mäsak wrote:
> Mark (>), Carl (>>):
>>> S05 describes tr/// in terms of the .trans function, a handsome but
>>> very different beast. Specifically, it doesn't seem to have a "scalar
>>> context", with which one could count things.
>>
>> What does trans return
Mark (>), Carl (>>):
>> S05 describes tr/// in terms of the .trans function, a handsome but
>> very different beast. Specifically, it doesn't seem to have a "scalar
>> context", with which one could count things.
>
> What does trans return in numeric (+) context?
As spec'd, it returns the numifica
What does trans return in numeric (+) context?
On Wednesday, January 27, 2010, Carl Mäsak wrote:
> How is "character counting" done in Perl 6?
>
> In Perl 5, it is `scalar tr/CG//` if I want to count the number of Cs
> plus the number of Gs in a string.
>
> S05 describes tr/// in terms of the .tr