in reply to Code Shortening (golf) [RESOLVED]

If you're allowed to use command line options like -n and -E:
$ echo EaEbFabG | perl -nE'$n+=~y///c&3for/(.*?)[A-Z]/g;say$n-3' 5
Perl 6 - links to (nearly) everything that is Perl 6.