Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Unfortunately I think you're right, these are just a few additional thoughts. that's unfortunate, prototypes don't seem to influence precedence at all Nitpick: They do influence precedence/parsing, just not in the way you want - from Prototypes: ... treated specially by the parser. mygrep() is parsed as a true list operator, myrand() is parsed as a true unary operator with unary precedence the same as rand() ...
... so builtins do basically behave the same way in terms of precedence - though as of 5.34 there isn't a builtin with a prototype of (&) or even (&@); grep has no prototype, which indicates it is treated specially by the parser (which is why I had to add the 1 after the above grep lest it be a syntax error instead of Not enough arguments). Update: Relevant: Named Unary Operators In reply to Re: (SOLVED) parsing problems with prototype blocks (updated)
by haukex
|
|