in reply to Re: Tk: exit main(@ARGV); fails
in thread Tk: exit main(@ARGV); fails

This is unlikely the problem. saying func() with the parens like that is enough for the compiler to note that func is a subroutine. It doesn't matter where you declared it because all subroutines are package scoped and compiled before runtime. Also, the error for using an undeclared subroutine is different from the one that Tye got.

It looks to me like something is up with exit wherein it has been defined with the expectation that it gets a number. Hmmmm Tye, did you try having main return 1?