I think you are getting too hung up on my example. My example was arbitrary - just a simple way designed to help me understand how to and where I can reference global variables, as opposed to local and static ones.
What is really bending my mind is this article: http://devcentral.f5.com/wiki/default.aspx/iRules/CMPCompatibility.html
"Note - demoted only if caught by validator--"global" keyword was not caught by validator (:: reference)"
1. I read this to mean I could define a global variable using the "global keyword" - hence "global client_local [TCP::local_port clientside]". Maybe that's wrong, and the only way to define a global variable is using the "$::client_local" syntax?
2. Is there really only two variable types - local and global, with the global sub-divided into two sub-types: CMP-compatible and non-CMP-compatible? That would make a lot more sense. The doc makes it sound like there are three types, but it only seems to provide examples on how to define two - static and local. I can't figure out where this third type fits.