in reply to Re^2: perl child to return var to a bash parent
in thread perl child to return var to a bash parent

I was trying to avoid writing to a temp file, but finally it seems to be the less worst solution...
Why? Just call from your bash script:
eval result=([1]=$(perl -e 'print join " ",map rand 10,1..50'))
and then use the results:
echo ${result[1]},${result[50]}
No temp files needed.