sub win32_exit { my ($exitcode) = @_; my $this_process; # get Win32 native handle to the current process Win32::Process::Open( $this_process, $$, 0 ) || die; # "kill" on Windows simply means # "force the process to exit with that exitcode" $this_process->Kill( $exitcode ); # we killed ourselves, should never get here die "Thou shalt never see this!"; }