Thanks for your response. I've been using strict and warnings. The open and the print are working, too as far as I can tell. Supposedly, if draw() fails an error is set in the Chart::Plot object, which I check for.
In short, the script ends with no errors and the draw() function writes to the file. It just doesn't seem to be writing the right stuff.