Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^5: Split a string based on change of character

by eyepopslikeamosquito (Canon)
on Jul 29, 2007 at 02:43 UTC ( #629365=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Split a string based on change of character
in thread Split a string based on change of character

I think ikegami meant $i^=1, i.e.:

my @words = grep $i^=1, split /(?<=(.))(?!\1)/, $string;
which does work.


Comment on Re^5: Split a string based on change of character
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://629365]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2015-01-28 19:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (222 votes), past polls