Actually, a closer inspection revealed that I had an earlier line in the script that I had forgotten that told it I was looking at Jpg files:
my $MyImage = GD::Image->newFromJpeg($file, 0);
I found that of course if I changed that line instead to
my $MyImage = GD::Image->newFromPng($file, 0);
That it will then happily read PNG files. Had I remembered having set GD to read Jpeg files, I probably would have realized that one earlier. Of course, the errors telling me that the file wasn't Jpeg probably should have clued me in, as well...