Today I had to figure out how to get the current Maya version with MEL. I assumed it would be in some sort of environment variable but it turns out it had it's own command. I spent a good fifteen minutes trying to track this down so I hope this blog post can save somebody out there at least some of that time.
The command is
getApplicationVersionAsFloat.
float $mayaVersion = `getApplicationVersionAsFloat` ;