forked from book/perlsecret
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
47 lines (32 loc) · 1.6 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
NAME
perlsecret - Perl secret operators and constants
DESCRIPTION
Perl has a long tradition of giving nicknames to some of its operators
(possibly a form of Huffmanisation). These nicknames are based on the
appearance of the operator, rather than its function.
The well-known examples are the "diamond operator" <> and the "spaceship
operator" <=> .
The Perl "secret operators" have been discovered (or created) by Perl
obfuscators and golfers, usually when looking for a shorter way to
perform a given operation.
Secret operators are not actually secret, and they are not actually
operators either. The perl parser does not specifically recognise them,
and no one is trying to hide them from you. But they are like operators
in the sense that these Perl programmers see them often enough to
recognize them without thinking about their smaller parts, and eventually
add them to their toolbox. And they are like secrets in the sense that
they have to be discovered by their future user (or be transmitted by
a fellow programmer), because they are not explicitly documented.
Because secret operators are not operators they don't have real names,
and so they need nicknames. Like the above Perl operators, their name
is usually related to their shape.
The term "secret operator" was probably coined by Abigail in a
comp.lang.perl.misc post in January 2003.
This manual page describes and explains the main Perl secret operators.
AUTHOR
Philippe Bruhat (BooK)
COPYRIGHT
Copyright 2010-2014 Philippe Bruhat (BooK).
LICENSE
This documentation is free; you can redistribute it and/or modify it
under the same terms as Perl itself.