"Greetings @{[ get_planet() ]}lings, we come in peace!"
Evaluating functions directly inside of a string. It's sort of alluded to with "@{[ keys %hash ]}", but in doesn't come right out and say it. "Greetings " . get_planet() . "lings, we come in peace!"
As it says, the whole point of the baby cart is to force list interpolation. If you don't specifically want that, don't do it. "Greetings ${\ get_planet() }lings, we come in peace!"
will give you scalar context as well. My http://shadow.cat/blog/matt-s-trout/madness-with-methods write-up covers some other uses of ${\} my $message = <<"HEREDOC";
Greetings @{[ get_planet() ]}lings,
We come in peace.
Sincerely,
Your New @{[ get_invaders() ]} Overlords
HEREDOC
Sure you can jam them into variables first, or use sprintf, but it's a matter of preference so long as you know what you're doing.Although, it is really interesting find!
These are very useful when you play Perl Golf, and can be pretty powerful in the hands of an expert player (sadly, my dreams of becoming one has remained just that.)
The author of this document was a regular in Perl Golf tournaments and also in the Fun With Perl mailing list, which was a precursor and launchpad for several of these tournaments.
For those interested, here is a series of articles about "The Lighter Side of Perl Culture": http://www.perlmonks.org/?node_id=410774
See also, "Perlgolf History" at http://terje2.frox25.no-ip.org/perlgolf_history_070109.pdf (not sure if this link is still alive.)
From another someone who has written fair amount of perl, some of them are simple idioms suitable for production use; rest are just an exercise in curiosity.
The venus operator "0+ $input"(or `0 + $input` as I will write it) is an acceptable and recommended way to convert input to number(i.e if you know your your input is a valid number in string form). !! isn't unique to perl - I have used it in JS, C etc to convert a value to boolean. @{[ ]} is useful for logging, thought it does look difficult to grok in first look. Goatse is basically list assignment and then using it in scalar context; I won't do that but assigning to list is frequently done `my ($a, $b) = $input =~ /regex/`. =<>~ is just badly formatted `my ($a, $b) = <> =~ /regex/` will read fine to a perl programmer.
The rest (especially goatse, venus and things like X-Wing) should be fairly intuitive from operator precedence.
Don't get me wrong, but comment that start out like this generally turn out to be trolls.