$ cat cantfork.pl #!/usr/bin/perl use strict; use warnings; my $child = fork; die "Well that's odd - the fork failed" unless defined $child; if ($child) { print "Parent! Child is $child\n"; } else { print "Child!\n"; } sleep 1; exit; $ ./cantfork.pl Parent! Child is 17198 Child! $ ulimit -u 9 $ ./cantfork.pl Well that's odd - the fork failed at ./cantfork.pl line 6.