in reply to Operator precedence (or, I'm an idiot)
How many actual files are there in the system? You could just run a regular expression replace in VIM.
I probably don't have the expression right but something similar might work
s/(\$\w)\ \=\ (\d+)\ and\ (\d+)/$1\ \=\ ($2)\ \&\&\ ($3)/gi
You might also be able to this with a perl script, or perhaps special tricks with a commandline grep.