

However, the eval wasn't working as there were some ' in the exif values, so this was messing up the array.

I then modified my perl script so that it would output text in the format for a php array, then in the php file I eval'd the variable that called the perl script.

You just call your script from php like $var = `/usr/bin/perl -T /home/brighto/public_html/photosite/cgi/test2.cgi '$file' 'EXIF'` Then in the perl script you access your variables through for $file and for 'EXIF'. I found out how to do that here: Passing parameters to perl script. Next I tried to make it so I could pass the image filename from php to the perl script. I tried #3 and #4 out of those, of which #4 worked.
