in reply to Automatically creating incremental file names

open (IMG , '>out.png') or die $!;
If you were trying
open (IMG , '>$$.png') or die $!;
You would have to use double quotes so $$ is interpolated. You didn't show the example of you using the pid for the filename so I could off on your problem.

As for creating a unique filename, I prefer the quick and dirty way
my $filename = $$ . time() . '.png';