http://qs321.pair.com?node_id=305969


in reply to Why does this work? AUTOLOAD sans sub declaration

That is indeed odd. Try putting a semicolon on the line that defines do_something.

Still odd even if that does fix it.

Are you sure it was a book? Are you sure it wasn't.....nothing?

Replies are listed 'Best First'.
Re: Re: Why does this work? AUTOLOAD sans sub declaration
by chromatic (Archbishop) on Nov 10, 2003 at 22:44 UTC

    Named subroutine definitions aren't expressions. They don't need semicolons after the block.

      Yeah, you're absolutely right. I think I was thinking of prototypes.

      Are you sure it was a book? Are you sure it wasn't.....nothing?