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