note
chromatic
<p>If you're not terribly worried about resource cleanup, there's always [CPAN://POSIX]<code>::_exit()</code>:</p>
<code>#!/usr/bin/perl -w
use strict;
use POSIX ();
END
{
warn "Exiting $$\n";
}
die "Couldn't fork\n" unless defined( my $pid = fork() );
if ($pid)
{
print "Parent is $$, child is $pid\n";
}
else
{
print "Child is $$\n";
POSIX::_exit( 0 );
}</code>
373937
373937