in reply to Compilation error in the perl script
You also repeatedly call printLog() but your sub is named prinLog.