use threads; use WWW::Curl::Multi; my $x = WWW::Curl::Multi->new(); if (fork == 0) { #Do stuff NOT related to WWW::Curl here.. print STDERR "thread sleeping\n"; sleep 1; print STDERR "thread exiting\n"; threads->exit(0) if ($^O eq 'MSWin32' && threads->can('exit')); exit(0); } #### use POSIX (); use WWW::Curl::Multi; my $x = WWW::Curl::Multi->new(); if (fork == 0) { #Do stuff NOT related to WWW::Curl here.. print STDERR "thread sleeping\n"; sleep 1; print STDERR "thread exiting\n"; POSIX::_exit(0); }