going along with that you can do it like this as well
alias caps { return $calc($regex($1-,/[A-Z]/g)/$len($1-)*100) }