Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^6: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...) (??{})

by pKai (Priest)
on Sep 22, 2007 at 10:54 UTC ( #640509=note: print w/replies, xml ) Need Help??


in reply to Re^5: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...) (js)
in thread Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)

Telling m//g in list context to forget about the captures and just return the matches:

@list = "ZBBCZZ" =~ /(??{'(.)\1*'})/g;

or probably more exact: there are no captures m// can see

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://640509]
help
Chatterbox?
[Discipulus]: ther is a way to golf this further:if(p$_)&(p $r)&$r!=$_ ?
[Discipulus]: being $r the reverse of $_

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2017-10-20 07:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (259 votes). Check out past polls.

    Notices?