Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Split a string based on change of character

by moritz (Cardinal)
on Jul 28, 2007 at 08:04 UTC ( #629265=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -MData::Dumper -wle '$Data::Dumper::Indent=0; $_="aaabbc"; prin
    +t Dumper([split m/(?<=(.))(?!\1)/]);'
    $VAR1 = ['aaa','a','bb','b','c','c'];
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2014-08-30 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls