Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Some old PM nodes I remember that seem relevant:

From The Lighter Side of Perl Culture (Part IV): Golf, some "hidden golfing features":

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

Update: BooK has recently popularized a new set of secret operators, the screwdriver operators:

-=! 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;
These screwdriver operators follow on from earlier secret operator work, such as Dmitry Karasik's original set of "!"-based secret operators and BooK's flaming X-wing operator (@data{@fields} =<>=~ $re).

Jan 2010 Update: LanX created a "poll" (really a meditation) at Poll: How should the =( )= be called??? in an attempt to solve the well-known naming issues of this idiom: =( )=. Though Rolex narrowly defeated Saturn back then, nowadays LanX prefers wristwatch.

March 2012 Update: BooK at it again, this time proposing a new sperm secret operator. An alternative name is the "kite" secret operator.

From perlsecret:

Perl secret operators:

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
Update: for the inchwormy operators above, see also the "Inchworm" and "Inchworm on a stick" sections at perlsecret and The Lighter Side of Perl Culture (Part IV): Golf (search for inchworm).

Perl secret constants:

Constant Nickname Value ================================================= <=><=><=> Space fleet 0 <~> Amphisbaena $ENV{HOME}

October 2014 Update: Re: Perl Idioms Explained - ${\$obj->method} and @{[sort @list]} by ambrus proposes a new "twin baby cart" operator, as used by tybalt89 and tails in winning golf entry at shinh's golf site:

/[3-9]/||print"@{[world,hello,'world!']}[/./g] "for 0..$$

See also: BooK proposes a new Perl secret operator (Secret Operator References) and Perl Secret Operator Emojis (2023)


In reply to Re: Hidden features of Perl (More Secret Operator References) by eyepopslikeamosquito
in thread Hidden features of Perl by vxp

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-19 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found