in reply to Fork issues

...when I daemonize it by 'perl server.pl &', the functions within the fork, including the second e-mail, will not be executed.

Do the "other functions" by any chance write anything to stdout/stderr? In this case, the shell would stop the backgrounded process (until you foreground it again (using fg, normally — in which case you should then see the pending output))...  Just a thought.