in reply to Compilation error in the perl script

You also repeatedly call printLog() but your sub is named prinLog.

The way forward always starts with a minimal test.