in reply to strangeness with prototypes and 'logical defined or'?

// is being interpreted as a match operator, and that can't be followed by a term (7), thus the syntax error.

|| can't be interpreted as a term, so there's no ambiguity.

Replies are listed 'Best First'.
Re^2: strangeness with prototypes and 'logical defined or'?
by pme (Monsignor) on May 26, 2015 at 05:51 UTC
    It works this way:
    perl -ce 'sub foo (&) {} (foo {;}) // 7'
      Are you asking why it's interpreted as a defined-or in that case? Because it's impossible for a match operator to be present there.