E nesse caso, vai imprimir o que?<br><br><span style="font-family: courier new,monospace;">#!/usr/bin/perl</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">eval eval '"'.</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ('['^'+').('['^"\)").( '`'|')') </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> .('`'|'.').('['^'/').('{'^ '[' ).'('. </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> '('."'".('`'^('&')). "'".(('{')^ (( '[') </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> )).('['^'#'). ('{'^'[').('^'^('`' | '/')). </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> (('^')^( '`'|"\.")).( ( '^')^('`'| </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> (( ( '.'))) )) .( '^' </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">^ ( '`'|'.')).')' .('{'^ '['). ('.').( (( </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">(( ( ( ( '{') ))))))^'[').'('. "'". ((( '{')</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">)^ '.' )."\'".( '{'^'[') .('['^'#').( '{' ^((</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> '[') )).+( ';'&'=' ). (('^')^( '`'| '.' )).</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ((( '^'))^( ( ('`'))| (( '.' ))) ).')' . </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ((( ( "\{")))^ '['). ( "\.").( </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> '{' ^ (( '[' ))). ('('). ( (( "'"))). </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> (( '!') )."'".( </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> '{' ^'[' ).''. ('['^'#' </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ).+( ( (( ( '{')) ))^'[' ) .(('^')^( </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> "\`"| (( ( (( ',') ))))) ).+( '^'^( </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> '`'|'.')). "\)".( '{' ^+ </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> "\["). '.'.('{'^'[').'\\'. '"' .(( </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> '\\' )).'\\'.('`'|'.'). '\\'. </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> '"'.')'.';'.('!'^'+').'"' </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ;$:='.'^'~';$~='@'</span><br><br>Desculpem, não pude resistir ;)<br clear="all"><br>ABS()<br><br>
<br><br><div class="gmail_quote">On Wed, Feb 2, 2011 at 03:06, Daniel de Oliveira Mantovani <span dir="ltr"><<a href="mailto:daniel.oliveira.mantovani@gmail.com">daniel.oliveira.mantovani@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">perl -E 'my $num = 1; my $happy=$num+\$num;say $happy'<br>
Qual o valor, você acha que vai imprimir ?<br>
<br>
perl -E '$main::Foo::foo = 1;say "Primeiro {$foo}";package Foo;say<br>
"Segundo {$foo}"'<br>
Qual o valor, você acha que vai imprimir ?<br>
<br>
perl -E 'my @list = 1 .. 10; my $eba = (@list,1,1); say $eba'<br>
Qual o valor, você acha que vai imprimir ?<br>
<br>
perl -E '$a->{$_} = sub {return 0+\$a} for 1 .. 10; say $a->{$_}->()<br>
for 1 .. 10'<br>
Quantos números diferentes apareceram ?<br>
<br>
perl -E 'sub foo {return undef}; my@heyhey=foo(); say 42 if @heyhey'<br>
Vai imprimir alguma coisa na tela ?<br>
<br>
perl -E '$foo->{a} = ""; say "uha" if exists $foo->{a}; say "buuu" if $foo->{a}'<br>
"uha" ou "buuu" qual sai na tela ?<br>
<br>
perl -E 'say 41+a+1'<br>
Qual o resultado ?<br>
<br>
perl -le 'print$2while s/(\d*):?(\d*)/($1+$2||1).":$1"/e'<br>
Qual o nome dessa seqüência famosa ?<br>
<br>
perl -E '@foo{1 .. 5} = (a .. e); say sort %foo'<br>
O que vai imprimir ?<br>
<br>
perl -E 'say localtime; say scalar localtime'<br>
Qual a diferença ?<br>
<br>
O mais legal, é saber o "porque". Acho que um "Perl Quiz" com<br>
perguntas divertidas, ajuda no conhecimento da linguagem.<br>
<br>
--<br>
"If you’ve never written anything thoughtful, then you’ve never had<br>
any difficult, important, or interesting thoughts. That’s the secret:<br>
people who don’t write, are people who don’t think."<br>
=begin disclaimer<br>
Sao Paulo Perl Mongers: <a href="http://sao-paulo.pm.org/" target="_blank">http://sao-paulo.pm.org/</a><br>
SaoPaulo-pm mailing list: <a href="mailto:SaoPaulo-pm@pm.org">SaoPaulo-pm@pm.org</a><br>
L<<a href="http://mail.pm.org/mailman/listinfo/saopaulo-pm" target="_blank">http://mail.pm.org/mailman/listinfo/saopaulo-pm</a>><br>
=end disclaimer<br>
</blockquote></div><br>