$ echo EaEbFabG | perl -nE'$n+=~y///c&3for/(.*?)[A-Z]/g;say$n-3' 5 [download]
In reply to Re: Code Shortening (golf) by moritz in thread Code Shortening (golf) [RESOLVED] by Young Monk