in reply to Calling functions

If split_log calls another program, it is posible you started that program in the background. Your perl script will continue executing even though the program you called hasn't finished.