in reply to exists and defined functions

exists operates on hashes only (as the error suggests): it checks whether the key given exists in the hash. To test for the existence of an array element, use defined:
print DATA "\+$exp[1]" if defined $exp[1];
The above code snippet is untested, BTW.

CU
Robartes-