Bernie Cosell <[EMAIL PROTECTED]> wrote:

> I realize that, but still it seems odd that the construct:
>     &;
> actually calls a null-named subroutine rather than giving you a
> syntax error.

It's not a null-named subroutine.  The semicolon is the sub 
name.  As you said later in your message, "Perl is content to 
try to *call* '&main::;'" -- note the semicolon.

> Meta-question: since Perl is content to try to *call* '&main::;'
> is there some trickery to *DEFINE* such a subroutine?  For
> example, trying:
>    main:: { die; }
> gets you what I would have expected in the '..&' case: a syntax
> error for a missing subroutine name.

    *; = sub { die };

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Washington, DC

Reply via email to