my @reexec = [ $0, @ARGV ]; if ( defined (&DB::DB ) ) { unshift @reexec, 'perl', '-d:ptkdb'; } # when I press the refresh button: exec( @reexec )