in reply to Function Prototypes
The errors will go away if you move the definition of usage() above the first call of it.
You are defining usage() with a prototype of no arguments by the empty parens before the code block. This is a good use of that because the sub is constant and can be inlined. Perl takes the "void" prototype as a signal it may do so.
After Compline,
Zaxo
Update: Reply to mvaline. Yes, the reason you get warnings is that -w is in force, and the compiler is unable to apply the prototype (having seen it too late). I don't know enough about perl's innards to explain why. It is sufficient to put a declaration like sub usage(); before any call.
|
|---|