exists() is a function used by hash data structures. You are calling it on array elements. Try:
print DATA "\+$exp[1]" if $exp[1];
That will print as long as the value in
$exp[1] is not 0.
update:Response tailored to user's evident < 5.6 version of perl...see below comments for versions >= 5.6