What happens if you remove the array code, does then the 64 bit run fine?
you could do a bit of testing using backticks or open etc equivalents to run the system command, and you'd get to read the stdout and stderr.
the hardest line to type correctly is: stty erase ^H