note
eyepopslikeamosquito
<P>
Some old PM nodes I remember that seem relevant:
<ul>
<li> [id://426037]
<li> [id://564792] (and [id://564843])
<li> [id://525392]
</ul>
</P>
<P>
From [id://437032], some "hidden golfing features":
<CODE>
Golfing Technique Inventor Year
----------------- -------- ----
@{[]} aka baby cart The Larry or 1994
The Schwartz
}{ aka eskimo greeting The Abigail late 1990s
~~ aka inchworm ???
~- aka inchworm-on-a-stick The Hospel 2002
$_ x= boolean expression The Larry early 1990s
y///c aka Abigail's Length Horror The Hall 1996
stuff value into $\ for printing The van der Pijll 2001
}for(...){ variation of eskimo The Hospel 2001
--$| magical flip-flop The Hospel 2002
\$h{X} is one less than ++$h{X}
aka Thelen's Device The Thelen 2002
</CODE>
</P>
<P>
<B>Update:</B> [BooK] has recently popularized a new set of secret operators,
the <a href="http://www.nntp.perl.org/group/perl.golf/2009/06/msg2524.html">screwdriver operators</a>:
<CODE>
-=! and -=!! - flathead
+=! and +=!! - phillips
*=! and *=!! - torx
x=! and x=!! - pozidriv (http://en.wikipedia.org/wiki/Pozidriv)
This is a conditional "set to empty string" operator
(the string equivalent of the torx):
$x x=!! $y is same as $x = '' unless $y;
$x x=! $y -- $x = '' if $y;
</CODE>
These screwdriver operators follow on from earlier secret operator work, such as Dmitry Karasik's
<a href="http://www.nntp.perl.org/group/perl.fwp/2007/11/msg4028.html">original set of "!"-based secret operators</a> and [BooK]'s <a href="http://www.nntp.perl.org/group/perl.fwp/2007/11/msg4006.html">flaming X-wing operator</a> (<CODE>@data{@fields} =<>=~ $re</CODE>).
</P>
<P>
<B>Jan 2010 Update:</B> [LanX] created a "poll" (really a meditation) at [id://816934]
in an attempt to solve the well-known naming issues of this idiom: <C>=( )=</C>.
Though <I>Rolex</I> narrowly defeated <I>Saturn</I> back then, nowadays LanX [id://11155395|prefers wristwatch].
</P>
<P>
<B>March 2012 Update:</B> [BooK] at it again, this time proposing a new
<a href="http://www.nntp.perl.org/group/perl.fwp/2012/03/msg4169.html">sperm secret operator</a>. An alternative name is the "kite" secret operator.
</P>
<P>
From [mod://perlsecret]:
</P>
<P>
Perl secret operators:
<CODE>
Operator Nickname Function
================================================
0+ Venus numification
@{[ ]} Babycart list interpolation
!! Bang bang boolean conversion
}{ Eskimo greeting END block for one-liners
~~ Inchworm scalar
~- Inchworm on a stick high-precedence decrement
-~ Inchworm on a stick high-precedence increment
-+- Space station high-precedence numification
=( )= Goatse aka Saturn scalar / list context
=< >=~ Flaming X-Wing match input and assign captures
~~<> Sperm
<<m=~>> m ; Ornate double-bladed sword
-=! -=!! Flathead
+=! +=!! Phillips
x=! x=!! Pozidriv
*=! *=!! Torx
</CODE>
Update: for the inchwormy operators above, see also the <I>"Inchworm"</I> and <I>"Inchworm on a stick"</I> sections at [mod://perlsecret]
and [id://437032] (search for inchworm).
</P>
<P>
Perl secret constants:
<CODE>
Constant Nickname Value
=================================================
<=><=><=> Space fleet 0
<~> Amphisbaena $ENV{HOME}
</CODE>
</P>
<P>
<B>October 2014 Update</B>: [id://1104410] by [ambrus] proposes a new "twin baby cart" operator, as used by tybalt89 and tails in <a href="http://golf.shinh.org/p.rb?hello+hello+world">winning golf entry</a> at shinh's golf site:
<CODE>
/[3-9]/||print"@{[world,hello,'world!']}[/./g]
"for 0..$$
</CODE>
</P>
<P>
See also: [id://959855] and [id://11155383] (2023)
</P>
773443
773443