in reply to Forced to Use Subroutine Prototypes

Thank you all! The code wasn't mine, but belonged to a colleague who happens to have a strong C background. Forcing the use of prototypes in PERL smacked of heresy. After you reassured me that prototypes weren't required, I was able to go to his code and point out where he had declared a PERL subroutine with a "C" accent like this: sub mySubName () { BLOCKOFCODE } Once the parentheses were removed in the declaration, PERL no longer complained that a prototype was needed. Grazie!
  • Comment on Re: Forced to Use Subroutine Prototypes

Replies are listed 'Best First'.
Re^2: Forced to Use Subroutine Prototypes
by ysth (Canon) on Jul 25, 2007 at 06:51 UTC
    Just to be clear, Perl wasn't complaining that a prototype was needed, it was complaining that you specified a prototype, but not early enough for it to be applied to a caller.