http://www.perlmonks.org?node_id=605947


in reply to Re: Debugging CGI/PERL
in thread Debugging CGI/PERL

For debugging with ptkdb you can put the setting of DISPLAY in a BEGIN block:

BEGIN { $ENV{DISPLAY} = '192.168.32.50:0' }

since ptkdb doesn't try to display a window until after compilation is complete.