in reply to function prototyping & perl 5.8.20

The code that you've shown is legal in both versions of perl. Either something just above the sub declaration is tripping up perl, or maybe there are invisible chars at the end of the 'sub' line (such as \r) which one version of perl is more fussy about. It may be that your 'simplifying' edit just happens to remove the \r's (or whatever).

That particular error message means that following the empty prototype '()' and after skipping any whitespace, perl didn't see a character that it expected, such as '{'.

Dave.