As I said before: Not enough information...
It seems as if your formular is something like this (untested code of course):
my @sign=( .... ); # Some combination of -1, 0 1
my @sum= map { $sign[$i] * $VAR1[$i] } (0..$#VAR1);
print eval join ' + ', @sum;
Now you "only" need to get the correct combination of -1, 0 and 1 for @sign, which is a "simple" combinational task but will be very lengthy...
s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
|