in reply to Uninitialized value in numeric eq (==) after 65 iteration of a loop using fork?!?

perldoc -f fork

It returns the child pid to the parent process, 0 to the child process, or "undef" if the fork is unsuccessful.

When you compare undefined $pid with any number you get warning

You can make something like this: die "Can't fork: $!" unless defined $pid;