You'll have to Benchmark it yourself to see if it's any faster, but maybe:
c:\@Work\Perl\monks>perl -wMstrict -le "$_ = 'iiiiiiiiMMMMMMMMMMMooooooooooooMMMMMMMMMMiiiiiMMMMMMMMoooo'; my $count =()= $_ =~ m{ M+ }xmsg; print $count; " 3
In reply to Re: Can you write a faster code to perform this task?
by AnomalousMonk
in thread Can you write a faster code to perform this task?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |