I don't have Programming Perl, but what it looked like the
original poster's code was doing was *calling* the spawn
sub, not defining it; calling it with a code reference.
Is that correct? If so, I doubt the sub ref would have
to contain a fork, as the actual spawn sub contains the
fork.