Hi David, The way you have this code set up, perl will print a string to its stdout. Emacs will read that string into a buffer, then write it to a file.
It would be simpler to write the file directly from perl. Note that this will require specifying the file name twice (in the :file header and in the perl code). This is because ob-perl does not support the :results graphics syntax (which could be classed as a wishlist-type bug). -- Aaron Ecay