in reply to Re^2: releasing GD in CGI script?
in thread releasing GD in CGI script?

Usually you don't need this. Just use strict; use warnings; and make the variable that holds the GD object a lexical variable, then it will be cleaned automatically on scope exit.

If you can't figure it out, you can still say undef $gd;