Here's try #2. Things that are not true operators or have other caveats are marked, where known. LMKA.
unary (prefix) operators:
\ - reference to
* - list flattening
? - force to bool context
! - force to bool context, negate
not - force to bool context, negate
+ - force to numeric context
- - force to numeric context, negate
~ - force to string context
. - method call on current topic
++ - preincrement
-- - predecrement
unary (postfix) operators:
++ - postincrement
-- - postdecrement
other postfix operators:
() - [when operator is expected]
[] - array access
{} - hash access
hyperoperators:
^ - as prefix to any unary/binary operator, "vectorizes" the operator
binary operators:
+ - * / % ** x xx ~
+= -= *= /= %= **= x= xx= ~=
< > <= >= == != <=>
lt gt le ge eq ne cmp
&& || !! // - boolean operations
&&= ||= !!= //=
and or xor err
.& .| .! << >> - bitwise operations
.&= .|= .!= <<= >>= - (or is that .<<, .>>, etc?)
& | ! - superpositional
all any one (none?)
~~ !~ - smartmatch and/or perl5 '=~' (?)
like unlike - (tentative names)
=> - pair creator
, - list creator
; - "lesser comma", list-of-lists creator
: - adverbial
. - method call
.. - range
... - (maybe range exclusive of endpoint, or maybe ..Inf)
= - assignment
:= - binding
::= - binding, but more so
trinary operators:
?? ::
parens, misc, and quotelike operators:
()
[] - [when term is expected]
{} - [when term is expected]
m// - shorthand for something else
s/// - shorthand for something else
tr/// - shorthand for something else
'...' "..." `...` /.../ << >>
q qq qx qr qw
(heredocs) - [exact format unknown]
named unary (prefix) operators, terms, and other assorted hangers-on, identified when possible:
-X - [op] filetest operators
temp - [op]
let - [op]
ref - [op]
defined - [op]
undef - [op]
undef - [term]
exists - [op]
delete - [op]
${ } - [deref] dereference scalarref
@{ } - [deref] dereference arrayref
%{ } - [deref] dereference hashref
&{ } - [deref] dereference coderef
... - [term] yada**3
Inf - [term]
NaN - [term]
is - [declar] var properties
but - [op?] val properties
-> - [declar] like 'sub'
hash - [declar] force hash context
methods and listops, uncategorized:
my our
map grep
sqrt log sin cos tan
lc lcfirst uc ucfirst
int ord oct hex (bin?)
MikeL
- Re: Perl6 Operator List, Take 2 Michael Lazzaro
- Re: Perl6 Operator List, Take 2 Damian Conway
- Re: Perl6 Operator List, Take 2 Smylers
- Re: Perl6 Operator List, Take 2 Simon Cozens
- Re: Perl6 Operator List, Take 2 Damian Conway
- Re: Perl6 Operator List, Take 2 Simon Cozens
- Re: Perl6 Operator List, Take 2 Damian Conway
- Re: Perl6 Operator List, Take 2 Nicholas Clark
- RE: Perl6 Operator List, Take 2 fearcadi
- RE: Perl6 Operator List, Take 2 Larry Wall
- Re: Perl6 Operator List, Take 2 Damian Conway