Lots of ways to increment a variable

How to increment a variable?

There are two obvious solutions:

use the increment operator ++

use += to add one to a variable

But there are many ways to do it.

On the page http://paris.mongueurs.net/aplusplus.html there are 309 (!!!) ways to put 1 to the variable $A .

This page contains the same code but here it is also possible to run the code in the browser.

It turned out that not all of code that is posted is working.

There are several solutions that adds not one, but slightly different number. For example, 97, 116

Some solutions are clearly a joke — 35.

Some just don't work — 45

There are solutions that work on some Perl version and don't work on other. 298 words on 5.8 but does not work on 5.30

Some solutions does not work in the browser be because of the limitations of the service https://PerlBanjo.com (code in the service does not have access to the Internet and it is not possible to install additional modules).

But many of the examples work and there are some absolute masterpieces, for example:

43 plus plus A;

68 use less

69 more.pm

78 dollar A plusplus;

83 obfuscated

142 qaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaq

144 keyword only

184 A++

225 vertical

273 (((((((((())))))))))

300 "assembly language"

Below is a complete list of all inventions how to add one to the variable.

Author: Moun's

Author: Moun's

▶ Run $A += 1 ; print $A;

Author: Moun's

▶ Run $A = $A + 1 ; print $A;

Author: Moun's

▶ Run $A = eval { $A + 1 }; print $A;

Author: Moun's

Date: 1999-12-07

▶ Run $A =~ s/^(.*)$/local($\)=1; join "", reverse map {((($\==0)&&($_))||($\=0)||($_!=9)&&(($_+1)))||(($\=1)&&(0))} reverse grep \/\d\/, split \/(\d)\/, "$1"/e ; print $A;

Author: Moun's

Date: 1999-12-15

▶ Run $A = ($A*$A- 1 )/($A- 1 ); print $A;

Author: Moun's

▶ Run do { s/^(\d+)/'\'x$1.".\(${\(++$*)}."/e } while ( s/\(\*.\.*\()(\d*)/$1.${\($*=$2*length$1)}/e ); print $A;

▶ Run $A+=$A>> 31 |~$A>> 31 ; print $A;

▶ Run $A+= 3 >> 2 | 1 << 0 ; print $A;

Date: 1999-11-04

▶ Run $A+= 0 << 1 | 2 << 3 >> 4 ; print $A;

Date: 1999-11-04

Date: 1999-12-07

Date: 1999-12-07

Date: 2000-02-18

Date: 2000-02-18

▶ Run $A+= do { qq{ @{[ cos $A!=$A]} } }; print $A;

Date: 2000-03-13

Date: 2000-03-13

Date: 2000-03-22

▶ Run $A+= 1 ; print $A;

Date: 2000-03-24

▶ Run $A=~ s/(-)?(\d+(?:\.\d*)?)/#les filles c'est des cloches (Souchon) "$1 1+"x$2.'1'/sexisme ; print $A;

Date: 2000-04-01

▶ Run A: goto (A) if $A!=$A+++ 1 ; print $A;

Date: 2000-04-05

▶ Run $A = do { while ( 1 &$A){$A>>= 1 } continue {++$AA} ($A| 1 )<<$AA}; print $A;

Date: 2000-04-06

▶ Run $A = $A{$A} ? &{$A{$A}}($A) : &{$A{$A} = sub { 1 + shift }} ($A); print $A;

Date: 2000-04-06

▶ Run $A = do {$_=!$_;$_<<= 1 while ($A&$_<< 1 <=$A); ($A&$_| 1 ) + ($A&$_&&$A&~$_| 1 ||$A&~$_)}; print $A;

Date: 2000-04-12

▶ Run $A= 1 /$A*( reverse map {$A+=$_}( 1 ..$A,$A= 0 ))[ 0 ]; print $A;

Author: Stéphane

Date: 2000-04-12

Author: Stéphane

Date: 2000-04-12

Author: Stéphane + BooK

Date: 2000-04-12

Author: Stéphane

Date: 2000-04-23

▶ Run ${ "A\0comme quoi perl n'ignore pas partout les \0" }++; print $A;

▶ Run $A= scalar @{[ eval '0,' x $A. 0 ]}; print $A;

Date: 1999-12-07

▶ Run $A= eval q.@{[.. "0," x $A. qq|0]}| ; print $A;

Date: 2000-12-07

▶ Run $A=($A= '$A' . '$A' x $A)=~ s/\$A/=/g ; print $A;

Date: 2000-03-30

▶ Run $A=@{[($A) x $A,$A]}; print $A;

Date: 2000-03-30

Date: 2000-04-12

▶ Run use Cobol; PROCEDURE DIVISION ADD 1 TO A GIVING B MOVE B TO A; print $A;

Author: Stéphane

Date: 2000-04-13

▶ Run use AI; Increment variable A value by 1 print $A;

▶ Run *A=\($A+ 1 ); print $A;

Date: 2000-04-24

Author: Moun's

Date: 2000-04-25

▶ Run $A+=($A)?($A/$A):( 1 ); print $A;

Date: 2000-04-26

▶ Run 1 ?$A+=. 5 :$A+=. 5 ; print $A;

Date: 2000-04-26

▶ Run $A = @{[ 0 ..$A]}; print $A;

Date: 2000-05-03

▶ Run foreach ( qw{36 29 -22 0} ){$A {A} .= chr ($A {AA} +=$_)} eval $A {A} ; print $A;

Date: 2000-05-10

▶ Run sub plus {\(${$_[ 0 ]}+=. 5 )} plus plus A; print $A;

Author: D0vid

Date: 2000-05-22

Date: 2000-06-22

▶ Run /${1}def/ ; $ A ++ print $A;

Date: 2000-06-27

Author: Alain Tesio

Date: 2000-08-11

▶ Run while ($Z!= 1 ) { $Z+=( 1 -$Z)/ 2 ; $A+= 1 -$Z }; print $A;

Author: Robin

Date: 2000-07-27

▶ Run ${ uc ((** {PACKAGE} =~ /(.)/g )[ 1 ])}++; print $A;

Author: Robin

Date: 2000-07-27

▶ Run ${*A{ join '' ,( split /(A)/ , 'RASCAL' )[- 3 , 1 ,- 1 , 3 , 0 ]}}++; print $A;

Date: 2000-07-27

▶ Run eval join '' , q "$_=0;sub A{ ++$b; ++$c}" =~ m/(?:\s|^)(\S)\S*/g ; print $A;

Author: Stéphane

Date: 2000-08-01

▶ Run $A -= system malfunction; print $A;

Author: Eric

Date: 2000-08-03

▶ Run use Filter::cpp; $A += INCREMENT; print $A;

Date: 2000-08-07

▶ Run $A = split /AA/ , 'A' . 'AA' x $A; print $A;

Author: Stéphane

▶ Run @_ = grep { ( 0 x $_) !~ m/^(..+)(?:\1)+$/ && $_ } 0 .. 666 ; ${ chr eval eval "'0x'. $_[$_[$_[4]-$_[0]]]" }++; print $A;

Author: Artur

▶ Run @b = split "" , unpack "b*" ,( pack "l" ,$A); foreach (@b){$_=$_? 0 : 1 ; last if ($_)}; $A = unpack "l" , pack "b*" ,( join "" ,@b); print $A;

Author: David Rigaudiere

Date: 2000-08-11

▶ Run $A += print '' ; print $A;

Author: Stéphane

Date: 2000-08-15

▶ Run tie $A, A; print $A; package A; sub TIESCALAR { my $A; bless \$A, shift } sub FETCH { shift ; ++$$ {shift} }; print $A;

Author: Stéphane

Date: 2000-08-26

▶ Run $A += !! /_/ || m | _ /\ _ | m || !!\ _ ; print $A;

Author: Stéphane

Date: 2000-08-26

▶ Run $A += !! /_/ || m | /\|m || !!\_; print $A;

Author: Stéphane

Date: 2000-08-26

▶ Run $A += !! /_/ || m | /\|m | | !!\_; print $A;

Author: Stéphane

Date: 2000-08-27

▶ Run ${ eval v65 }++; print $A;

Author: Stéphane

Date: 2000-08-27

▶ Run eval eval join '.' , map { ord } split '' , '$A++' ; print $A;

Author: Stéphane

▶ Run ${($a = [ { un => 1 , 'A' => 2 }, 1 , A ])->{A}} += $a->{un}; print $A;

Author: Stéphane

Date: 2000-08-30

▶ Run use Symbol; $*{$a = ${+gensym}} {SCALAR} = 'A' ; ${$*{$a} {SCALAR} }++; print $A;

Date: 2000-09-05

▶ Run q = 0 A = 1 + A; print $A;

Author: Stéphane

Date: 2000-09-06

Author: Stéphane

Date: 2000-09-07

▶ Run ; q (setq A (if (boundp 'A) (+ 1 A) 1 ) ) ; $A++; print $A;

Author: Stéphane

Date: 2000-08-27

▶ Run use less $A++; print $A;

Author: Stéphane

Date: 2000-09-10

▶ Run BEGIN { $INC{ 'more.pm' }++ } use more $A++; print $A;

Author: Stéphane

Date: 2000-09-11

▶ Run use 5.6 ; 'obfuscation' =~ m/(.{2,}?)(?{$a.=$1;})$/ ; ${ eval sprintf "v%1.1f" , scalar split '' ,$a}++; print $A;

Author: Julien Bordet

Date: 2000-09-12

▶ Run *B = *A; $B += ! defined ($C); print $A;

Date: 2000-09-13

▶ Run s ]]aAaa]| s ~a~A^e~e| s }aa}BC^ih}e| eval ; print $A;

Date: 2000-09-26

▶ Run sub AUTOLOAD {*A=*AUTOLOAD;*$A= sub { substr ($A, 1 + rindex ($A, q(_) ))+ 1 };&$A;} $A = &{ "_$A" }; print $A;

Author: Kai

Date: 2000-09-26

▶ Run map {$_++}$A; print $A;

▶ Run %_=( 'm/X**/' , '\?. ' , 'for a{}' , '\s.\s' => 'm/{3}/' , '\?.\*' => '1' ,$" = '' => 'k if exists$K' => '.Y' ); for ( sort + keys %_){ eval ;$@=~ /$_{$_}/ ; push @_, substr ($&,- 2 , 1 )}; eval "@_" ; print $A;

Author: Stéphane

Date: 2000-10-03

Author: Kai

Date: 2000-10-06

▶ Run package plusplus; sub AUTOLOAD {${( caller ( 0 ))[ 3 ]}=~ /$_[0]::(.*)$/ ;$1. '++' } package main; sub dollar { eval '$' .shift;} dollar A plusplus; print $A;

Author: Stéphane

Date: 2000-10-08

▶ Run ${ chr split '' , $_ = '____/\____||! / \Q $ Dirac ** 2+| | $ Chomsky**2 \ /' } += eval $_; print $A;

Date: 2000-10-10

▶ Run $A+=\$A/ bless \$A|| /\A/ ; print $A;

Date: 2000-10-10

▶ Run $A+=\$A//\A// bless \$A; print $A;

Author: Julien Bordet

Date: 2000-10-12

▶ Run eval pack ( "C4" , <DATA> =~ m __DATA__ 36654343; print $A;

Date: 2000-10-12

▶ Run BEGIN { local $B= join '' , map {chr} sub {(( shift )**($_=( shift )))* ($_**$_)}->(( 1 << 2 )+ 1=> 1 << 1 ), sub {( shift )*( shift ) }-> ( 3=> ( 1 << 5 )+ 5 ), sub {(($0= shift )**($0))*(($O= shift )**( $O))}->( 2=> 3 ), sub { map {$__+= 1 <<$_}@_;$__}->(( reverse 4 .. 6 ), 2=> 0 );( substr ($B, 3 , 0 )= substr ($B, 1 , 1 )=> substr ( $B,- 1 , 0 )= chr ( ord ( substr ($B,- 1 ))- 1 ))=>(( substr ($B, 1 , 0 )=> substr ($B, 6 , 0 ))=( split // => q(aa) ))=>(( substr ($B, 6 , 1 )=> substr ($B, 7 , 1 ))=( substr ($B, 7 , 1 )=> substr ($B, 1 , 1 )))=>$B.= '*' ; eval uc reverse ( join ( q(=) => reverse ($B ) => join ( q(_) => substr ( substr ($B=>- 2 )=> 0=> 1 )=> substr ($B,- 1 ))));} sub _ A {$_A=~ tr (-,[ 0 - 9 ]&(%{}))()cd;$_A+ 1 } $A = &{ "_$A" }; print $A;

▶ Run { my @r = sort {$A+=( my $r=$a<=>$b);$r} map {hex} unpack 'a2' x ( length ( q(2a4c4760020d2d440258420e4b4614045f112d30070b363218) )>> 1 ), '1f5d200f4e02590816402a31214a18321b292c515e4e2f3a47' ;}; print $A;

Author: Jean

Date: 2000-10-26

▶ Run for ($A^=$B= 1 ;!($A&$B);$A^=$B<<= 1 ){}; print $A;

Date: 2000-10-26

▶ Run $A^=$B= 1 ; while (!($A&$B)){$A^=$B<<= 1 }; print $A;

Author: Jean

Date: 2000-11-15

▶ Run ($A= sprintf "0b0%b" , $A)=~ s/0(1*)$/"1".(0 x length($1))/e ;$A= oct ($A); print $A;

Date: 2000-11-15

▶ Run $A = do { local $_ = sub {( scalar (@{[[ q(\x00) ], ( q(\x00) ) x abs ($_[ 0 ])]}) * (($_[ 0 ]<=> 0 )?($_[ 0 ]<=> 0 ): 1 ))}; &$_($A)< 0 ?&$_($A) + 2 :&$_($A)}; print $A;

Date: 2000-11-15

▶ Run &{$_= sub {$A+=$^W}}; print $A;

Date: 2000-11-22

▶ Run eval join '' , sort { ord ($a)|( 8 & ord $a)<< 3 <=> ord ($b)|( 8 & ord $b)<< 3 } qw /+ A + $/; print $A;

Author: David Rigaudiere

Date: 2000-11-22

▶ Run $;=[]; ref $;=~ /^(.)/ ;$$ 1 +=!$|; print $A;

Author: Maddingue

Date: 2000-11-23

▶ Run ${ substr (++($b= 'Z' ), 0 , 1 )}++; print $A;

Author: Jean

Date: 2000-11-23

▶ Run use Math::Complex; $A -= exp (i * pi); print $A;

Date: 2000-11-27

▶ Run $A -= fork ? die : wait ? wait : die ; print $A;

Date: 2000-11-27

▶ Run $A = (($A<< 1 )+( 1 << 1 ))>> 1 ; print $A;

Date: 2000-11-27

▶ Run my $B = $A+ 1 ; do {$A+= int ( rand ()*( 1 << 9 ))-( 1 << 8 )} until $A==$B; print $A;

Date: 2000-11-27

▶ Run $A += 1 e- 6 for 1 .. 1 e6; print $A;

Date: 2000-12-02

▶ Run $A = do 'A' if open A, '>A' and print A "$A+unlink'A'" and close A; print $A;

Date: 2000-12-05

▶ Run $A = sub { $_[ 0 ]+$_[ 1 ]|| 1 }->( sub { my $A = shift ;$A = sqrt $A for ( 1 .. 1 e6);($A,( shift ))}->( abs $A,$A)); print $A;

Date: 2000-12-05

▶ Run $A = length " @{[ do {$\ " = '';(1)x$A}]}" ; print $A;

Author: Xavier Canehan

Date: 2000-12-06

▶ Run $A+= sub { open ($A, '>-' );fileno $A}->(); print $A;

Date: 2000-12-06

▶ Run $A += fileno STDOUT; print $A;

Date: 2000-12-06

▶ Run $A = substr ($A, 0 , 1 ) eq '-' ? '-' .length( substr ( '-' x substr ($A, 1 ), 1 )) : length ( '-' . '-' x $A) ; print $A;

Date: 2000-12-06

▶ Run $A = 2 *(- 0 . 5 +($A== abs $A)) * push @_, (( 2 *($A!= abs $A))..abs $A); print $A;

Date: 2000-12-08

▶ Run $A = ($A<<(--($_= 2 **$A)/ oct '0' . 'b' . '0' . '1' x $A)) -(($A<< 0 )-($_= 2 **$A)/ oct '0' . 'b' . '1' . '0' x $A); print $A;

Date: 2000-12-18

▶ Run $A = ($A,++$A,$A++,--$A,$A)[ rand ( 5 )]; print $A;

Author: arhuman

Date: 2001-02-12

▶ Run $A += do { reset " " }; print $A;

Author: arhuman

Date: 2001-02-12

▶ Run my %un; bless \%un, 1 ; $A+= ref \%un; print $A;

Author: [beatnik]

Date: 2001-06-04

▶ Run $A += ord ( "1" )- 48 ; print $A;

Author: [beatnik]

Date: 2001-06-04

▶ Run $A += $A** 0 ; print $A;

Author: [beatnik]

Date: 2001-06-04

▶ Run $A -= - 1 ; print $A;

Author: François Désarménien

Date: 2001-07-23

▶ Run $A += 42 == 42 ; print $A;

Author: Stéphane

Date: 2001-09-10

Author: Init64

Date: 2001-09-10

▶ Run $A+=(~$A^$A)>>(( log ((~$A|$A)+ 1 )/ log ( 2 )- 1 )); print $A;

Author: Stéphane

Date: 2001-09-11

▶ Run `echo 1 >1` ; open 1 , 1 ; $A += chomp ($a = < 1 >); print $A;

Author: Jérôme Abela

Date: 2001-09-11

▶ Run $iter = 1000000 ; for ($n= 0 ; $n<$iter ; $n++) { $sum += rand ( 2 ); } $A += $sum/$iter; print $A;

Author: Jérôme Abela

Date: 2001-09-11

▶ Run $A_original = $A; while ($A != $A_original+ 1 ) {}; print $A;

Author: Stéphane

Date: 2001-09-17

▶ Run $A += japh =~ japh; print $A;

Author: Stéphane

Date: 2001-09-17

Author: Stéphane

Date: 2001-09-20

▶ Run perl -we 'use strict; our $A += qr|japh| =~ ":"; print $A' ; print $A;

Author: Stéphane

Date: 2001-09-17

▶ Run eval qq|\$ @{ [( join ( "\0" , qw( Abbot Abbey Amen ) )=~ m/^([^\0]*)[^\0]*(\0\1[^\0]*)*$/ )[ 0 ]]} ++| ; print $A;

Author: Eric

Date: 2001-09-26

▶ Run use MIME::Base64; $A += decode_base64( "MQ==" ); print $A;

Author: François Désarménien

Date: 2001-10-24

Author: Stéphane

Author: Stéphane

Date: 2001-11-03

▶ Run package Aplus; use Filter::Simple sub { s /A\+ /\$A++/ }; BEGIN { $INC{ 'Aplus.pm' }++; } use Aplus; A+; print $A;

Author: Stéphane

Date: 2001-11-21

▶ Run package Aplus; use Filter::Simple sub { s /\./a/g }; BEGIN { $INC{ 'Aplus.pm' }++; } use Aplus; sub . { @. = shift =~ m/(.)/g ; sc.l.r @. } $A+= (. .l.p.ge) - . w.n.doo print $A;

Date: 2001-11-27

▶ Run ${ substr (\ substr ($$, 0 , 0 ), 2 , 1 )}++; print $A;

Author: Wesley

Date: 2002-01-03

Author: Olivier Poitrey

Date: 2002-01-11

▶ Run use overload '--' => sub {++${$_[ 0 ]}}, '""' => sub {${$_[ 0 ]}}; $A = bless (\($B=$A)); $A--; print $A;

Author: Stéphane

Date: 2002-01-21

▶ Run $ a { 1 } = 1 ; $A += eval "$ a { 1 }" ; $a= 1 ; $A += eval "$ a { 1 }" ; print $A;

Author: Stéphane

Date: 2002-01-25

▶ Run $SIG {__DIE__} = sub { &${ 'A--' }; exit }; ${ "A--" } = sub " A ++" { $A++ }; &{ 'A++' }; print $A;

Author: Stéphane

Date: 2002-01-25

▶ Run eval '$' . prototype sub ( A ++) {}; print $A;

Date: 2002-02-04

▶ Run $A=( map {$s+= 2 *$_/$A;$s} 1 ..$A)[- 1 ]; print $A;

Date: 2002-02-04

▶ Run $_=$? x $A; s/./$'&&$'/g ;$A= y///c /$A; print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-04-12

▶ Run @x=( 4 , 2 , 1 ); eval ( '$' .pack "c3" , sprintf ( "0%o" x4,@x[ 2 .. 2 * 2 , 2 ]),($x[ 0 ]* 10 +$x[ 1 ]+ 1 )x2); print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-04-15

▶ Run $x= sub {$b.=! length ($b)? '$' : 'A' if ( length ($b)< 2 );($b.= '+' ) if ( length ($b)>= 2 );++$i< 3 and &$x; return ($b)}; eval (&$x); print $A;

Author: Sylvain Lhullier

Date: 2002-04-17

▶ Run $A += ( ( 213 * 417 ) =~ m/(.)$/ ); print $A;

Author: Sylvain Lhullier

Date: 2002-04-17

▶ Run $A= int ( join ( "" , reverse map { if ($f){$_} elsif ($_< 9 ){$f= 1 ;$_+ 1 } else {0} } ( reverse ( split ( // ,$A)), 0 ) )); print $A;

Author: Sylvain Lhullier

Date: 2002-04-17

▶ Run for ( @l=( reverse ( split ( // ,$A)), 0 ) ) { $_++; last if ($_<= 9 ); $_= 0 ; } $A= int ( join ( "" , reverse @l)); print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-04-18

▶ Run map { if ($A){$i=$_ e q (pack "C",(1<<5) +( 1 << 1 )+ 1 )?$i+ int ( log ($A)/ log ( 0xA ))+ 1 :$i+ 1 ;($_ e q (pack "C",(1<<5) +( 1 << 1 )+ 1 )) and $A=$i/( int ( log ($A)/ log ( 1 +( 1 << 3 )+ 1 ))+ 1 )} else {$A= 1 }} split ( // ,( "$A" x $A).pack "C" ,( 1 << 5 )+( 1 << 1 )+ 1 ); print $A;

Author: Mtv Europe

Date: 2002-04-21

▶ Run !$A+++! q !+++A$!; print $A;

Author: Mtv Europe

Date: 2002-04-21

▶ Run y zzzcd x s vv chr length q qaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaq ve x s vv chr length q qaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaq ve x s vv chr length q qaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaq ve x s vv chr length q qaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaq ve x eval ; print $A;

Author: Mtv Europe

Date: 2002-04-22

▶ Run y ccccd x s vvchr length q qaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaqve x s vvucve x s vvuc ave x s vvchr length q qaaaaaaqx length q qaaaaaaqve x eval ; print $A;

Author: Mtv Europe

Date: 2002-04-22

▶ Run y ccccd x s vvchr oct oct ord uc ave x s vvucve le s vvuc ave x s vvchr oct oct oct ord uc bve x eval ; print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-04-24

▶ Run $A= $i. reverse ( join ( "" , map {!$b and $b=$i=!$b!=$i;$i=!! int (($_+=($i or "" ))/ 0xA );$_%= 012 } split ( // , reverse ($A)))); print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-04-24

▶ Run $A+=( split // ,( localtime )[( gmtime )-( 1 << 2 )])[$today]; print $A;

Date: 2002-04-24

▶ Run $A += length length length $A; print $A;

Author: Olivier "Init64" Matt

Date: 2002-04-24

▶ Run ${ eval ( "uc substr reverse (scalar 'really fun'),7,1" )}=~ s/^(.*)$/$1+1/e ; print $A;

Date: 2002-04-24

▶ Run use Inline Befunge => "q+1;sulpa:;" ; $A=aplus($A); print $A;

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run $A+= chdir ( '/' ); print $A;

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run use Date::Manip; use POSIX qw(strftime) ; $A = UnixDate(DateCalc(strftime( "%Y%m%d%H:%M:%S" , gmtime ($A)), 1 ). ' GMT' , "%s" ); print $A;

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run eval { die (($A+ 1 ). "

" )}; $A= int ($@); print $A;

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run open (FILE, "expr $A + 1|" ); $A = int (<FILE>); close (FILE); print $A;

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run $A= index (( 'X' x $A). 'Xx' , 'x' ); print $A;

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run $A = log ( exp ($A)* exp ( 1 )); print $A;

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run use DBI; $r=DBI-> connect ( "dbi:Pg:dbname=base" , "login" , "passwd" ) ->prepare( "select ?+1" ); $r->execute($A); $A=$r->fetchrow_array(); print $A;

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run $t= time (); sleep $A+ 1 ; $A= time ()-$t; print $A;

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run $A+=( stat ( '/' ))[ 1 ]/ 2 ; print $A;

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run use XML::LibXML; use XML::LibXSLT; $parser=XML::LibXML->new(); $style_doc=$parser->parse_string( '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/><xsl:template match="t"><xsl:value-of select="@a+1"/> </xsl:template></xsl:stylesheet>' ); $stylesheet = XML::LibXSLT->new()->parse_stylesheet($style_doc); $A= int ($stylesheet->output_string($stylesheet->transform( $parser->parse_string( "<t a=\"$A\"/>" )))); print $A;

Author: Maddingue

Date: 2002-04-25

▶ Run map { s ,plus,++,, s ,^,\$,}$_= "A plus" ; eval ; print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-04-26

▶ Run pipe (LIT_P,ECRIT_F); pipe (LIT_F,ECRIT_P); local ($fh)= select ECRIT_F; $|= 1 ; select $fh; local ($fh)= select ECRIT_P; $|= 1 ; select $fh; if ($pid = fork ) { close LIT_P; close ECRIT_P; print ECRIT_F "$A

" ; chomp ($A=<LIT_F>); close LIT_F; close ECRIT_F; waitpid ($pid, 0 ); } else { die "Pas moyen : $!" unless defined $pid; close LIT_F; close ECRIT_F;; chomp ($B=<LIT_P>); $B+= int ( log ( 2.718282 )); print ECRIT_P "$B

" ; close LIT_P; close ECRIT_P; exit ; }; print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-04-30

▶ Run for (@b= split ( // , unpack ( "B32" , pack ( "N" ,$A))) and $i=@b;$b[--$i] or !($b[$i]= 1 ) or !($A= unpack ( "N" , pack ( "B32" , join ( "" ,@b))));$b[$i]= 0 ) {}; print $A;

Date: 2002-04-30

Date: 2002-04-30

▶ Run $A += (( localtime )[ 2 ]-( gmtime )[ 2 ])/ 2 ; print $A;

Date: 2002-04-30

▶ Run $A += ( localtime )[ 2 ]-( gmtime )[ 2 ]; print $A;

Date: 2002-04-30

▶ Run use Fcntl; $A += F_GETFD; print $A;

Date: 2002-04-30

▶ Run use Text::Abbrev; %operations = abbrev qw( plus addition plusplus A ) ; $A += grep { /n$/ } values %operations; print $A;

Date: 2002-04-30

▶ Run use Symbol::Approx::Sub; sub aplusplus { $A++ } &aplus; print $A;

Date: 2002-04-30

▶ Run use POSIX; $A += &ENOMEM - &EAGAIN; print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-04-30

▶ Run sub A {$A[$A]=$A;(!$A and $A=!$A) or (($A-=$A/$A) and A and $A=@A)};A; print $A;

Date: 2002-04-30

Author: Stéphane

Date: 2002-05-01

Author: Stéphane

Date: 2002-05-16

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run rmdir rand ($A); $A += $!/ 2 ; print $A;

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run $A += open (F, ">/dev/null" ); close (F); print $A;

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run for ($a= 0 ;$a<=$A;$a++){} $A=$a; print $A;

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run use LWP::UserAgent; $c = ( LWP::UserAgent->new()->simple_request(HTTP::Request->new( GET=> 'http://paris.mongueurs.net/aplusplus.html' ))->content() =~ m :^(.*)< /pre></td >: m )[ 0 ]; eval $c; print $A;

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run $A += int ( rand ( 1 )+ 1 ); print $A;

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run sub A { my ($A,@A) = @_; if ( ! defined ($A[$A]) ) { ( 1 , @A ); } elsif ( ++$A[$A] > 9 ) { $A[$A] = 0 ; A($A- 1 ,@A); } else { @A } } $A= join "" ,A(- 1 ,($A=~ /(.)/g )); print $A;

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run sprintf "%${A}.0f %n" , $A, $A; print $A;

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run $A = length sprintf "%${A}.0f " , $A; print $A;

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run $A = ( $A =~ m/(.*)/g )[ 0 ] + 1 ; print $A;

Author: Stéphane

Date: 2002-05-28

▶ Run use Inline::Files; open A, '>' ; ++$A; eval <A>; print $A;

Author: Maddingue

Date: 2002-05-29

▶ Run eval (( map { s/^./\$/ , s/ //g ;$_}( split "$/" ,<< '' )[- 1 ])[ 0 ]); A A A + + A A + + AAAAAAA +++++++ +++++++ A A + + A A + +; print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-05-30

▶ Run $x= sub { if ( wantarray ()){( pack "c" ,${($_=&$x)}+ 5 )} else { pack "c" ,$=+ 1 }}; $A =${($_=&$x)}/$=+${(@_=&$x)[ 0 ]}; print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-05-30

▶ Run while ( 1 ) { pipe (LIT_P,ECRIT_F); pipe (LIT_F,ECRIT_P); local ($fh)= select ECRIT_F; $|= 1 ; select $fh; local ($fh)= select ECRIT_P; $|= 1 ; select $fh; if ($pid = fork ){ close LIT_P; close ECRIT_P; print ECRIT_F ($A--, "

" ); chomp ($I=<LIT_F>); $X+=!!$I; close LIT_F; close ECRIT_F; waitpid ($pid, 0 ); ($I< 0 ) and $A=$X and last ; } else { die "Pas moyen : $!" unless defined $pid; close LIT_F; close ECRIT_F;; chomp ($B=<LIT_P>); ( print ECRIT_P ($B, "

" )); close LIT_P; close ECRIT_P; exit ; } }; print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-05-31

▶ Run $_= sub {$~=$|++?$|:${ chr ($=+= 5 )}};${ chr ($=)}=&$_+&$_; print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-06-04

▶ Run $_= sub {$| or ($|= 1 and @_=( 1 , 1 , 0 , 0 , 4 , 2 , 3 , 5 )); return ( substr ( "000001" , 5 - shift (@_)))}; ${ eval ( pack "B24" , eval ( substr ( '.&$_' x8, 1 )))}++; print $A;

Author: François Désarménien

Date: 2002-06-05

▶ Run use Math::Trig; $A-= cos (pi); print $A;

Author: Stéphane

Date: 2002-06-05

▶ Run $A += ( '(A)' =~ m (\(A\)))[ 0 ] == ( '(A)' =~ m ((A)))[ 0 ]; print $A;

Date: 2002-06-05

▶ Run $A += ( '(A)' =~ m |\(A\)|)[ 0 ] == ( '(A)' =~ m |(A)|)[ 0 ]; print $A;

Author: Jean Forget

Date: 2002-06-07

▶ Run eval v36. 65.43 . 43 ; print $A;

Author: Stéphane

Date: 2002-06-08

▶ Run use constant; my constant $A++; print $A;

Author: Stéphane

Date: 2002-06-08

▶ Run sub _ : lvalue { $A }; ++ _ (); print $A;

Author: Stéphane

Date: 2002-06-08

▶ Run use Attribute::Handlers; sub _ : ATTR ( SCALAR ) { ${$_[ 2 ]}++ } my $A : _ ; $A; print $A;

Author: Stéphane

Date: 2002-06-14

▶ Run use Perl6::Currying; sub add ($ a , $ b ) { $a + $b }; $incr = &add.prebind( a=> 1 ); $A = $incr->($A); print $A;

Author: Christian Aperghis-Tramoni

Date: 2002-06-21

▶ Run for ($adn = "ATCACAACATTGATTG" ;($i< length ($adn)) or !($_=( pack "B32" ,$y)) or ! eval ();$y.= substr ( unpack ( "B8" , substr ($adn,$i++, 1 )), 5 , 2 )) {}; print $A;

Author: Maddingue

Date: 2002-06-22

▶ Run $_= "+36+29-22=" , s/\G([=+-])(\d*)/$==$1eq'='?$-:eval"$-$1$2",chr($-=$=)/ge , eval ; print $A;

Author: Sylvain Lhullier

Date: 2002-06-24

▶ Run use ExtUtils::MakeMaker; WriteMakefile( NAME => 'PlusPlus' , VERSION_FROM => 'PlusPlus.pm' ); package PlusPlus; require DynaLoader; our @ISA = qw(DynaLoader) ; our $VERSION = '0.01' ; bootstrap PlusPlus $VERSION; 1 ; __END_ _ /*Fichier PlusPlus.xs * / #include "EXTERN.h" #include "perl.h" #include "XSUB.h" MODULE = PlusPlus PACKAGE = PlusPlus int plusplus(input) int input CODE: RETVAL = input+1; OUTPUT: RETVAL #Fichier test.pl use PlusPlus; $A = PlusPlus::plusplus( $A ); print $A;

Author: Sylvain Lhullier

Date: 2002-06-24

▶ Run use IO::Socket; use Sys::Hostname; if ( ! fork () ) { $t = ( $s = new IO::Socket::INET( PeerAddr=> hostname(), LocalPort=> 8888 , Listen=> 1 ) )-> accept (); print $t ( <$t> + 1 ). "

" ; close $t; close $s; exit ( 0 ); } else { sleep 1 ; $s = new IO::Socket::INET( PeerAddr=> hostname(), PeerPort=> 8888 ); print $s "$A

" ; $A = int (<$s>); close $s; }; print $A;

Author: Sylvain Lhullier

Date: 2002-06-24

▶ Run $A += " 1 jour mon prince viendra ... 1 jour on s'aimera ... " ; $A += " 1 day my prince will come... one day... " ; print $A;

Author: Sylvain Lhullier

Date: 2002-06-24

▶ Run $A=-(- 1 -$A); print $A;

Author: Sylvain Lhullier

Date: 2002-06-24

Author: Sylvain Lhullier

Date: 2002-06-24

▶ Run $A = 1 + $A; print $A;

Author: Sylvain Lhullier

Date: 2002-06-24

Date: 2002-06-24

▶ Run ($A) = map {$A + $_} $A =~ /$A/ ; print $A;

Date: 2002-06-24

▶ Run $A = eval join '+' , map {$_ * 10 **$e + 0 **$e++} reverse $A=~ m/./g ; print $A;

Author: Stéphane

Date: 2002-07-08

▶ Run $A += @{ [ ( @{ caller (- 1 ) }, "$A++" ) ] }; print $A;

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run use Digest::MD5 qw(md5) ; $A -= ( split ( // , md5( 'Et un de plus pour la variable $A !...' ) ) )[ 3 ]; $A += ( split ( // , md5( 'Et un de plus pour la variable $A !...' ) ) )[ 3 * 3 ]; print $A;

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run use POSIX; $A += int ($POSIX::VERSION); print $A;

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run use URI::Escape; $c = '%2525252524%2525252541%252525252B%252525252B' ; while ($c) { if ( ($c=uri_unescape($c)) eq uri_escape($c) ) { eval $c; last ; } }; print $A;

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run use URI::Escape; $c = '%2525252524%2525252541%252525252B%252525252B' ; $c=uri_unescape($c) while ($c ne uri_escape($c)); eval $c; print $A;

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run use URI::Escape; eval uri_unescape( '%24%41%2B%2B' ); print $A;

Date: 2002-07-11

▶ Run ${( sort grep { /^\w/ && /\D/ } keys %{( eval "(caller)[0]" ). '::' })[ 0 ]}++; print $A;

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run eval join "" , sort { ($a,$b)=($b,$a); 1 } split ( // , '+$A+' ); print $A;

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run eval reverse '++A$' ; print $A;

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run $A += ( map { tr/P/P/ } split ( // , 'Perl' ) )[ 0 ]; print $A;

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run eval join '' , grep { /[^ -#%-*,-\@B-~]/ } qw( 2 f $ a p p A 0 8 + - * = + 4 ) ; print $A;

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run %h = ( '$' => '+' , 'A' => 'A' , 'a' => '$' , '+' => '+' ); eval join '' , values (%h); print $A;

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run %h = qw(+ + $ A) ; unshift @l, each (%h); unshift @l, each (%h); eval join "" , @l; print $A;

Author: Sylvain Lhullier

Date: 2002-07-11

Author: Sylvain Lhullier

Date: 2002-07-15

▶ Run $A += unshift @A, $A; print $A;

Author: Sylvain Lhullier

Date: 2002-07-15

▶ Run my %h=(); $A += ! exists ($h{$A}); print $A;

Author: Sylvain Lhullier

Date: 2002-07-15

Author: Sylvain Lhullier

Date: 2002-07-15

▶ Run my $c = '' ; while ( ($b = chr ( rand ( 255 )) ) ne '$' ){}; $c .= $b; while ( ($b = chr ( rand ( 255 )) ) ne 'A' ){}; $c .= $b; while ( ($b = chr ( rand ( 255 )) ) ne '+' ){}; $c .= $b; while ( ($b = chr ( rand ( 255 )) ) ne '+' ){}; $c .= $b; eval $c; print $A;

Author: Sylvain Lhullier

Date: 2002-07-15

▶ Run s //$A++ /e; print $A;

Author: Stéphane

Date: 2002-07-22

▶ Run eval "require 5.8" or $A+=($@ =~ m/\G.*?(\d+)/gc )[ ($] =~ m/(.)$/ )[ 0 ] ]; print $A;

Author: Stéphane

Date: 2002-07-22

▶ Run use 5.008 ; use Hash::Util lock_keys; lock keys (%A); lock_keys(%A); eval '$A{$A}++' or eval '$' . ($@ =~ m/(.)/ )[ 0 ] . '++' ; print $A;

Author: Stéphane

Date: 2002-07-22

▶ Run use 5.008 ; sub A :: AUTOLOAD : lvalue { $::A }; &{A::A}()+= 1 ; print $A;

Author: Stéphane

Date: 2002-07-22

▶ Run ( $B = ( $C = '$A--++' ) ) =~ s/ ./ $a=$&; ($& =~ m(\w)) ? "($a)" : "(\\$a)" /gex ; eval join '' , ( $C =~ m/$B/ )[ 0 .. 1 , 4 .. 5 ]; print $A;

Author: Rafael Garcia-Suarez

Date: 2002-07-26

▶ Run sub PUSHED { bless {} } sub FILL { $x = readline $_[ 1 ]; defined $x ? $x + 1 : undef } open FH, "<:scalar:via(main)" , \ "$A" ; $A = <FH>; close FH; print $A;

Date: 2002-08-06

▶ Run use Acme::Bleach; print $A;

Date: 2002-08-06

▶ Run use Acme::Morse; .--.-..--..---.-.--..--.-..--..---.-.--. ..-..-..-.....-.--.-.-..--.-.-..--.---.. .-.-...; print $A;

Author: Didier Collin

Date: 2002-08-21

▶ Run use LWP::UserAgent; use HTTP::Request::Common; $A += 9 * 9 * 5 -new LWP::UserAgent->request(GET 'http://www.oiseaux.net/neant' )->code; print $A;

Author: Court-Jus

Date: 2002-09-25

▶ Run while ($plop!= 1 ) {$plop= int ( rand ( 42 ));} $A+=$plop; print $A;

Date: 2002-09-27

▶ Run use Memoize; sub plusplus { $_[ 0 ]++ } memoize( 'plusplus' ); plusplus( $A ); print $A;

Author: Stéphane

Date: 2002-09-30

▶ Run *A::import = sub { shift ; eval shift }; $INC{ 'A.pm' }++; eval q|use A '$A++'| ; print $A;

Author: Philippe Rimbault

Date: 2002-10-28

▶ Run for ($A..$A+ 1 ){$A+=$_-$A}; print $A;

Date: 2002-11-03

Author: Simon Maréchal

Date: 2002-11-14

▶ Run $B= 1 ; while (($A& $B)==$B){$B=$B* 2 + 1 ;}$A^=$B; print $A;

Author: Simon Maréchal

Date: 2002-11-14

▶ Run ($d,$m,$f)=$A=~ /^(.*?)([^9]?)(9*)$/ ; $m||= 0 ; $f=~ s/9/0/g ; $m=~ tr/0-8/1-9/ ; $A= "$d$m$f" ; print $A;

Date: 2002-11-19

▶ Run eval << '' ; $A++; print $A;

Date: 2002-11-19

▶ Run eval '$A' . (<< "" $A++ =~ m |(\W+)|)[ 0 ]; print $A;

Date: 2002-11-24

▶ Run use strict; my strict $A++; print $A;

Date: 2002-11-24

▶ Run my main $A++; print $A;

Date: 2002-11-24

▶ Run %average::; print probably not my average $A++; print $A;

Date: 2002-11-24

▶ Run $A += nil + 1 if nil; print $A;

Date: 2002-11-24

▶ Run $A += !((false or true) != 0 ); print $A;

Date: 2002-11-24

▶ Run eval ( "A++" ) or (${ "A++" }) = $@ =~ m/"(.*)"/ ; eval '$' . ${ "A++" }; print $A;

Date: 2002-12-01

▶ Run use less; $A += require strict if useless; use if ; print $A;

Date: 2002-12-07

▶ Run ${ 'A.pm' }++; @INC =[ sub {$A++}] ; eval "require A" ; print $A;

Author: Julien Gilles

Date: 2002-12-12

▶ Run $A = 2 ** 32 -~$A; print $A;

Author: Julien Gilles

Date: 2002-12-12

▶ Run $A = 2 ** 64 -~$A; print $A;

Date: 2002-12-19

▶ Run $ B = \ $ A ; $ A = $ $ B + 1 ; print $A;

Date: 2003-01-10

▶ Run eval join '' , "\044" , +::, A::, '+++$A::' ; print $A;

Date: 2003-01-10

▶ Run $ A+= . 5=> . 5 >= . 5 ;$ A+=( 1 => . 5 ); print $A;

Date: 2003-01-31

▶ Run perl -ce 'BEGIN { $A += $^C }' ; print $A;

Author: Sébastien Morin

Date: 2003-02-19

▶ Run $A -= $#{ split ( // , $A)}; print $A;

Date: 2003-03-27

▶ Run sub q () { 1 } ; $A += & q () + q (); print $A;

Author: Robin Berjon

Date: 2003-05-02

▶ Run use Lingua::Romana::Perligata; ao postincresce.; print $A;

Author: Robin Berjon

Date: 2003-05-02

▶ Run use XML::SAX::ParserFactory; XML::SAX::ParserFactory->parser( Handler=> bless \$A,A)->parse_string( "<A/>" ); sub A :: end_element {${$_[ 0 ]}++}; print $A;

Author: Nicholas Clark

Date: 2003-05-04

▶ Run ${ chr ($=+(( ord ($/))>>$$/$$))}++; print $A;

Author: Nicholas Clark

Date: 2003-05-05

Author: Nicholas Clark

Date: 2003-05-05

▶ Run perl -le '${~$\&~$;&$^}++' ; print $A;

Author: Greg McCaroll

Date: 2003-06-21

▶ Run $SIG {__WARN__} = sub {}; my @c = qw( $ B + = ; 1 ) ; my $p; my $B; do { $p= '' ; $B= 41 ; for ( 1 ..( int ( rand ( 5 ))+ 4 )) { $p.=$c[ rand @c]; } eval $p; } until ($B == 42 ); $p =~ s/B/A/g ; eval $p; print "$p

" ; print $A;

Author: Guillaume Rousse

Date: 2003-06-24

▶ Run urpmf --name -v -e '($a || ++$a) && 0' ; print $A;

Author: François Pons

Date: 2003-06-24

▶ Run $A = ( sub { push @_, -@_ })->(($A) x ($A)); print $A;

Author: François Pons

Date: 2003-06-24

▶ Run $A = ( sub { push @_, +@_ })->(($A) x ($A)) / 2 + 1 ; print $A;

Author: Philippe Rimbault

Date: 2003-11-13

Author: Philippe Rimbault

Date: 2003-11-14

▶ Run $A= 0 unless defined $A; undef $/; $_= `lynx -source http://www.google.com/search?q=1%2B$A` ; ($A) = />1 \+ $A = (\d*)</ ; print $A;

Author: Philippe Rimbault

Date: 2003-12-04

▶ Run $_=\ 1 /\ 1 ;$A +=$_=~ s/(.*)(\.\d).*/($2>0?$1+1:$1+$A)/e ; print $A;

Author: Philippe Rimbault

Date: 2003-12-04

▶ Run $;= sub { sub _ { $_[ 2 ]= substr ($_[ 0 ], length ($_[ 0 ])- 1 , 1 ) + $_[ 1 ]; if ( length ($_[ 2 ])> 1 or length ($_[ 0 ])> 1 ){ $_[ 2 ]= _ ( substr ($_[ 0 ], 0 , length ($_[ 0 ])- 1 ), length ($_[ 2 ])> 1 ? substr ($_[ 2 ], 0 , 1 ): 0 ) . substr ($_[ 2 ], length ($_[ 2 ])- 1 , 1 ); } return ($_[ 2 ]); } $A= _ ($_[ 0 ], 1 ); };($A)->$;; print $A;

Author: Christophe Grosjean

Date: 2004-01-05

▶ Run $A+= (((((((((())))))))))=([ 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 ,FEU]); print $A;

Date: 2004-01-19

▶ Run ${*{$main:: {A} }{ ref \$A}}++; print $A;

Author: Christophe Renard

Date: 2004-01-19

▶ Run package A; sub TIESCALAR (){ bless [$_[ 1 ]],$_[ 0 ]} sub FETCH (){$_[ 0 ]->[ 0 ]+ 1 } package main; sub A {*a=*{$main::{$_[ 0 ]}}; tie $a,$_[ 0 ],$a;} A( 'A' ); print $A;

Author: Pied Axioplase

Date: 2004-02-05

▶ Run use IO::Socket; $A=aplusplus($A); sub aplusplus { $Socket; $server= "paris.mongueurs.net" ; $port= "80" ; $a= & connect ($Socket,$server,$port); $A= eval $a; } sub connect (){ my ($socket,$host,$port)=@_; my $time; my $reply,$title; $socket = IO::Socket::INET->new( PeerAddr => $host, PeerPort => $port, Proto => "tcp" , Type => SOCK_STREAM) or die "Couldn't connect to $host : $port

" ; print $socket "GET /aplusplus.html

" ; $reply = <$socket>; while ($reply){ $title=$reply if ($reply=~ /<title>/i ); $reply=<$socket>; } print $title; $title=~ s $title=~ s/(..)(..)/$2$1/ ; print $title; return $title; }; print $A;

Author: Olivier Mengué

Date: 2004-02-05

▶ Run eval pack ( 'N' , 608250667 ); print $A;

Author: Damien Krotkine

Date: 2004-05-13

▶ Run $A=()=( 0 ..$A); print $A;

Author: Rafael Garcia-Suarez

Date: 2004-05-14

Date: 2004-06-11

▶ Run ${ "" }= "Illegal seek::AUTOLOAD" ; *${ '' } = sub { ${ ( split // , "\U ${ \__PACKAGE_ _ } " )[ 1 ] }++ }; - qq|| => { q|| } -key { }; print $A;

Author: Philippe "BooK" Bruhat

Date: 2004-06-30

▶ Run use LWP::Simple; eval qq!@{[get( "http://paris.mongueurs.net/aplusplus.html" )=~ /title>([^<]*)/g ]}!; print $A;

Author: Olivier Mengué

Date: 2004-10-27

▶ Run echo +ACQ-A+-+- | perl -Mencoding=UTF- 7 ; print $A;

Author: Philippe "BooK" Bruhat

Date: 2004-10-29

Author: Philippe "BooK" Bruhat

Date: 2004-10-29

Author: Olivier Mengué

Date: 2004-10-29

▶ Run use Unicode::UCD 'charinfo' ; my %ascii_by_name = map { charinfo($_)->{name} => $_ } ( 32 .. 127 ); eval join '' , map { chr ($ascii_by_name{$_}) } ( 'DOLLAR SIGN' , 'LATIN CAPITAL LETTER A' , ( 'PLUS SIGN' ) x 2 ); print $A;

Author: Andrew Savige

Date: 2004-11-03

Date: 2004-12-14

▶ Run use Math::BaseCalc; $_ = Math::BaseCalc->new( digits=> [ split // , 'A+$' ])->to_base( 58 ) and eval ; print $A;

Date: 2005-01-27

▶ Run $A += $^R if "A BUG" =~ /^A(?{1}) (?:BUG(?{#32840}))?$/ ; print $A;

Author: Vincent Storez

Date: 2005-05-25

▶ Run $A += ( $A =~ m +$A$+ m ); print $A;

Author: Gaal Yahas

Date: 2005-06-04

▶ Run our $A; $::(<A>)++; print $A;

Author: Fabien Venzac

Date: 2005-07-28

▶ Run $A += (@A = split ( /\./ , `uname -r` ))[ 1 ] >> $A[ 0 ]; print $A;

Author: Gilles Arcas

Date: 2006-01-29

▶ Run * _ = *A; s/$/c!0123456789/ ; 1 while s / 9 c/c 0 /; s/^c/0c/ ; s/(.)c(\d*)!.*\1(.).*/$3$2/ ; print $A;

Author: Sébastien "Maddingue" Aperghis-Tramoni

Date: 2006-08-03

▶ Run $A += !!(!!($!||!$!) x !!($!||!$!)) x !!(!!($!||!$!) x !!($!||!$!)); print $A;

Author: Christian Aperghis-Tramoni

Date: 2006-11-28

▶ Run $B = 1 ; while (($A ^= $B) and !($A & $B)) { $B <<= 1 ; }; print $A;

Author: Christian Aperghis-Tramoni

Date: 2006-11-30

▶ Run sub s { my $n = @_[ 0 ]; ($n)?($n + & s ($n- 1 )): 0 } $A = $A?(& s ($A)<< 1 )/$A: 1 ; print $A;

Author: Damien Krotkine

Date: 2007-01-18

▶ Run $A += ! int \\\ y // // \\\\ y // // \\\\ y // // \\\\ y // /; print $A;

Author: Damien Krotkine

Date: 2007-01-18

▶ Run $A += (\ 0 -\ 0 )/- 24 ; print $A;

Author: Sébastien "Maddingue" Aperghis-Tramoni

Date: 2007-01-30

Author: Sébastien "Maddingue" Aperghis-Tramoni

Date: 2007-01-30

▶ Run ( sub { s ,^(.*)$,$1+ // ,e for @_})->($A); print $A;

Author: Christian Aperghis-Tramoni

Date: 2007-02-06

▶ Run AUTOLOAD {ASSEMBLEUR} set ($B = $A); if ($B == 0 ) { goto ZERO}; EMPILE: push (@l, $B); subs ($B = $B - 1 ); if ($B!= 0 ) { goto EMPILE} DEPILE: set ($x = pop (@l)); if (!$x) { goto CALCULE} add ($B = $B + $x); goto DEPILE; CALCULE: shft ($B = $B << 1 ); div ($A = $B / $A); goto TERMINE; ZERO: exor ($A = $A ^ 1 ); TERMINE:; print $A;

Date: 2007-02-07

▶ Run use Acme::DonMartin; sittzle shpliple spla pwadak sklork wap splork flif foomp ting rumble sprizawitz clack; print $A;

Date: 2007-02-07

▶ Run use HTTP::Size; $A += HTTP::Size::get_size( 'http://www.landgren.net/perl/one-byte.txt' ); print $A;

Date: 2007-02-07

▶ Run tie $A, 'Tie::Increment' , $A; $A; package Tie::Increment; sub TIESCALAR { bless { A=> $_[ 1 ]}, $_[ 0 ] } sub STORE { ($_[ 0 ])->{A} = $_[ 1 ] } sub FETCH { ++( shift )->{A} } 1 ; print $A;

Author: Philippe "BooK" Bruhat

Date: 2007-02-07

▶ Run @ARGV = ( '$c' , map { ( $_, '$c.=pop;pop' ) } qw( + + A $ ) ); s//pop/eeeeeee ; print $A;

Date: 2007-02-07

▶ Run use Inline C => 'int incr(int A) { ++A; return(A); }' ; $A = incr($A); print $A;

Date: 2007-02-07

▶ Run ${( sort grep {$_ eq uc } grep { /\A[^\W_\d]\Z/ } keys %::)[ 0 ]}++; print $A;

Date: 2007-02-07

▶ Run ${( sort grep {$_ eq uc } grep { /\A[^\W_\d]\Z/ } keys %{ do {__PACKAGE_ _ if __PACKAGE_ _ ne 'main' }. '::' })[ 0 ]}++; print $A;

Date: 2007-02-07

▶ Run $A += do { my @A = sub {($_[ 5 ]+ 1900 ,$_[ 4 ]+ 1 )}->( localtime ); (Add_Delta_Days(@A,Days_in_Month(@A), 1 ))[- 1 ] }; print $A;

Date: 2007-02-09

▶ Run my $p = $$; while ($A) { if ( fork ) { wait ; $A = 1 +($?>> 8 ); $p-$$ ? exit $A : last ; } } continue {--$A} exit 1 if $p ne $$; print $A;

Other articles