in reply to Re: Re: @_ the default variable?
in thread @_ the default variable?

The words subroutine and function are often used interchangably in perl. (Even perlsub does it!) What I meant by calling shift "not really a function" was that it is very unlike the functions you define in your code, which have a symbol table entry and thus are associated with a package, can have coderefs be taken of them, and be aliased to other names at the symbol table entry, or imported into other packages, in addition to being callable by the & syntax.

Replies are listed 'Best First'.
Re: Re: Re: Re: @_ the default variable?
by John M. Dlugosz (Monsignor) on Sep 15, 2001 at 02:41 UTC
    You mean you can't override shift like you can with other built-in functions (import into CORE:: if memory serves)?
      Starting with perl version 5.6.1 you can override shift, like you can with other built-ins. As an indication of this prototype("CORE::shift") returns \@ (which seems a little odd considering the default argument... Hmm...)