Just to add what others have said, on most shells (you don't say which shell, or version) if you export an array you only get the first element. I know that the Bash project was working on a method to do it, but I don't know if it was complete. You might ask on an AT&T mailing list
here about the Korn shell.
Those shells which allow exporting of functions (export -f
function_name) give interesting results, and it might be possible to embed the array in a function and export that - but you will have to unpack it in Perl and the format varies between shell versions.