Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by eyepopslikeamosquito (Chancellor)
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://629365]
help
Chatterbox?
[stevieb]: first real test using CLion with a Perl/C/XS project...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2017-02-22 01:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (322 votes). Check out past polls.