in reply to not: function or operator?

not is an operation. overload - Package for overloading perl operations in the Perl core documentation states that:
Autogenerated method substitutions are possible for the following operations: ...

! and not can be expressed in terms of boolean conversion, or string or numerical conversion.

Similarly, perlfunc - Perl builtin functions includes a list of Perl's builtin functions, and not is not included.

So I would say that based upon the Perl 5.6 core documentation not is an operator.

Replies are listed 'Best First'.
Re: Re: not: function or operator?
by japhy (Canon) on Mar 03, 2001 at 20:30 UTC
    not behaves differently in pre-5.6.0 than in 5.6.0.
    # under 5.005_02 DB<1> x not(1) || 2 0 '' DB<2> x not 1 || 2 0 '' # under 5.6.0 DB<1> x not(1) || 2 0 2 DB<2> x not 1 || 2 0 ''
    This is because in 5.6.0 they decided "if it looks like a function, it is a function". Because, you see, in 5.005_02, the code not(1) || 2 is just like not +(1) || 2 -- which means that (1) is not an "argument" to not, since not isn't a function. In 5.6.0, they decided that this looked too odd, and therefore, if it looks like a function, it is a function.

    japhy -- Perl and Regex Hacker