Do you know where your variables are? | |
PerlMonks |
Re: Can you write a faster code to perform this task?by karlgoethebier (Abbot) |
on Sep 29, 2014 at 13:32 UTC ( [id://1102356]=note: print w/replies, xml ) | Need Help?? |
Not the fastest but nice: scalar map { /(M+)/g } ($str); Compared to the anon monk's benchmark below:
Regards, Karl «The Crux of the Biscuit is the Apostrophe»
In Section
Seekers of Perl Wisdom
|
|