“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 (
<>), nicknamed by Geneva Wall and the spaceship operator (
<=>), nicknamed by Randal Schwartz. Some lesser known Perl operators with a nickname are the fat comma (
=>) and yada yada (
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 described in the Perl core documentation.
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…”