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.

1

Author: Moun's

▶ Run
#!/usr/bin/perl

$A++;

print $A;

2

Author: Moun's

▶ Run
#!/usr/bin/perl

$A += 1;

print $A;

3

Author: Moun's

▶ Run
#!/usr/bin/perl

$A = $A + 1;

print $A;

4

Author: Moun's

▶ Run
#!/usr/bin/perl

$A = eval { $A + 1 };

print $A;

5

Author: Moun's

Date: 1999-12-07

▶ Run
#!/usr/bin/perl

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

print $A;

6

Author: Moun's

Date: 1999-12-15

▶ Run
#!/usr/bin/perl

$A = ($A*$A-1)/($A-1);

print $A;

7

Author: Moun's

▶ Run
#!/usr/bin/perl

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

print $A;

8

Author: BooK 

▶ Run
#!/usr/bin/perl

$A+=$A>>31|~$A>>31;

print $A;

9

Author: BooK 

▶ Run
#!/usr/bin/perl

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

print $A;

10

Author: BooK 

Date: 1999-11-04

▶ Run
#!/usr/bin/perl

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

print $A;

11

Author: BooK 

Date: 1999-11-04

▶ Run
#!/usr/bin/perl

$A=~s/($A)/$1+1/e;

print $A;

12

Author: BooK 

Date: 1999-12-07

▶ Run
#!/usr/bin/perl

$A=~s/$A/$A+1/e;

print $A;

13

Author: BooK 

Date: 1999-12-07

▶ Run
#!/usr/bin/perl

$A=~s/$A/++$A/e;

print $A;

14

Author: BooK 

Date: 2000-02-18

▶ Run
#!/usr/bin/perl

$A+=@{[$A]};

print $A;

15

Date: 2000-02-18

▶ Run
#!/usr/bin/perl

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

print $A;

16

Author: BooK 

Date: 2000-03-13

▶ Run
#!/usr/bin/perl

$A =~ s/(-)?(\d+(?:\.\d*)?)/ $1.($2+($1?-1:1))/e;

print $A;

17

Author: BooK 

Date: 2000-03-13

▶ Run
#!/usr/bin/perl

$A=~s/(-)?(\d+(?:\.\d*)?)/"$1 1+"x$2.'1'/egoisme;

print $A;

18

Date: 2000-03-22

▶ Run
#!/usr/bin/perl

$A+=1;

print $A;

19

Author: BooK 

Date: 2000-03-24

▶ Run
#!/usr/bin/perl

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

print $A;

20

Author: BooK 

Date: 2000-04-01

▶ Run
#!/usr/bin/perl

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

print $A;

21

Date: 2000-04-05

▶ Run
#!/usr/bin/perl

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

print $A;

22

Author: BooK 

Date: 2000-04-06

▶ Run
#!/usr/bin/perl

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

print $A;

23

Date: 2000-04-06

▶ Run
#!/usr/bin/perl

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

print $A;

24

Author: BooK 

Date: 2000-04-12

▶ Run
#!/usr/bin/perl

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

print $A;

25

Author: Stéphane

Date: 2000-04-12

▶ Run
#!/usr/bin/perl

${ '`' | '!' } -= $#$ + ${""} - ${''};

print $A;

26

Author: Stéphane

Date: 2000-04-12

▶ Run
#!/usr/bin/perl

$ {'`'| '!'}-=-- +$#$+ $ { ""}- --$ { ''};

print $A;

27

Author: Stéphane + BooK

Date: 2000-04-12

▶ Run
#!/usr/bin/perl

${'@'|'!'&~'"'}-=$#$+${""}-${''};

print $A;

28

Author: Stéphane

Date: 2000-04-23

▶ Run
#!/usr/bin/perl

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

print $A;

29

Author: BooK 

▶ Run
#!/usr/bin/perl

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

print $A;

30

Author: BooK 

Date: 1999-12-07

▶ Run
#!/usr/bin/perl

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

print $A;

31

Author: BooK 

Date: 2000-12-07

▶ Run
#!/usr/bin/perl

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

print $A;

32

Author: BooK 

Date: 2000-03-30

▶ Run
#!/usr/bin/perl

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

print $A;

33

Author: BooK 

Date: 2000-03-30

▶ Run
#!/usr/bin/perl

$A=~s/([0-8]?9*)$/$1+1/e;

print $A;

34

Date: 2000-04-12

▶ Run
#!/usr/bin/perl

use Cobol;
PROCEDURE DIVISION
ADD 1 TO A GIVING B
MOVE B TO A;

print $A;

35

Author: Stéphane

Date: 2000-04-13

▶ Run
#!/usr/bin/perl

use AI;
Increment variable A value by 1 # $A++

print $A;

36

Author: BooK 

▶ Run
#!/usr/bin/perl

*A=\($A+1);

print $A;

37

Author: BooK 

Date: 2000-04-24

▶ Run
#!/usr/bin/perl

$A+=$A/$A;

print $A;

38

Author: Moun's

Date: 2000-04-25

▶ Run
#!/usr/bin/perl

$A+=($A)?($A/$A):(1);

print $A;

39

Author: BooK 

Date: 2000-04-26

▶ Run
#!/usr/bin/perl

1?$A+=.5:$A+=.5;

print $A;

40

Author: BooK 

Date: 2000-04-26

▶ Run
#!/usr/bin/perl

$A = @{[0..$A]};

print $A;

41

Date: 2000-05-03

▶ Run
#!/usr/bin/perl

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

print $A;

42

Author: BooK 

▶ Run
#!/usr/bin/perl

${*A{SCALAR}}++;

print $A;

43

Author: BooK 

Date: 2000-05-10

▶ Run
#!/usr/bin/perl

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

print $A;

44

Author: D0vid

Date: 2000-05-22

▶ Run
#!/usr/bin/perl

qq{D@{[$a++]}vid} # heuh, ça fait quoi au juste ?;

print $A;

45

Author: BooK 

Date: 2000-06-22

▶ Run
#!/usr/bin/perl

/${1}def/#{def}def/;{/A}def/++{add}def/A 1 def
; $ A ++ # % Mon imprimante, elle sait compter;

print $A;

46

Author: BooK 

Date: 2000-06-27

▶ Run
#!/usr/bin/perl

qq$@{[\$A++]}$;

print $A;

47

Author: Alain Tesio

Date: 2000-08-11

▶ Run
#!/usr/bin/perl

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

print $A;

48

Author: Robin

Date: 2000-07-27

▶ Run
#!/usr/bin/perl

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

print $A;

49

Author: Robin

Date: 2000-07-27

▶ Run
#!/usr/bin/perl

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

print $A;

50

Author: BooK 

Date: 2000-07-27

▶ Run
#!/usr/bin/perl

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

print $A;

51

Author: Stéphane

Date: 2000-08-01

▶ Run
#!/usr/bin/perl

$A -= system malfunction;

print $A;

52

Author: Eric

Date: 2000-08-03

▶ Run
#!/usr/bin/perl

use Filter::cpp;
#define INCREMENT 1
$A += INCREMENT;

print $A;

53

Author: BooK 

Date: 2000-08-07

▶ Run
#!/usr/bin/perl

$A = split/AA/,'A'.'AA'x$A;

print $A;

54

Author: Stéphane

▶ Run
#!/usr/bin/perl

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

print $A;

55

Author: Artur

▶ Run
#!/usr/bin/perl

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

print $A;

56

Author: David Rigaudiere

Date: 2000-08-11

▶ Run
#!/usr/bin/perl

$A += print '';

print $A;

57

Author: Stéphane

Date: 2000-08-15

▶ Run
#!/usr/bin/perl

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

print $A;

58

Author: Stéphane

Date: 2000-08-26

▶ Run
#!/usr/bin/perl

$A += !!/_/ || m|_/\_|m || !!\_;

print $A;

59

Author: Stéphane

Date: 2000-08-26

▶ Run
#!/usr/bin/perl

$A += !!/_/ ||  m|/\|m  || !!\_;

print $A;

60

Author: Stéphane

Date: 2000-08-26

▶ Run
#!/usr/bin/perl

$A += !!/_/ ||  m|/\|m | | !!\_;

print $A;

61

Author: Stéphane

Date: 2000-08-27

▶ Run
#!/usr/bin/perl

${ eval v65 }++;

print $A;

62

Author: Stéphane

Date: 2000-08-27

▶ Run
#!/usr/bin/perl

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

print $A;

63

Author: Stéphane

▶ Run
#!/usr/bin/perl

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

print $A;

64

Author: Stéphane

Date: 2000-08-30

▶ Run
#!/usr/bin/perl

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

print $A;

65

Author: BooK 

Date: 2000-09-05

▶ Run
#!/usr/bin/perl

q = 0 #=;sub A{$A};$
A = 1 + A;

print $A;

66

Author: Stéphane

Date: 2000-09-06

▶ Run
#!/usr/bin/perl

( # ) VARIABLE A 0 A ! : $A++; A @ 1+ A ! ; : :-) ; : ); :-) ;
);
$A++;

print $A;

67

Author: Stéphane

Date: 2000-09-07

▶ Run
#!/usr/bin/perl

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

print $A;

68

Author: Stéphane

Date: 2000-08-27

▶ Run
#!/usr/bin/perl

use less $A++;

print $A;

69

Author: Stéphane

Date: 2000-09-10

▶ Run
#!/usr/bin/perl

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

print $A;

70

Author: Stéphane

Date: 2000-09-11

▶ Run
#!/usr/bin/perl

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

print $A;

71

Author: Julien Bordet

Date: 2000-09-12

▶ Run
#!/usr/bin/perl

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

print $A;

72

Author: BooK 

Date: 2000-09-13

▶ Run
#!/usr/bin/perl

s]]aAaa]|s~a~A^e~e|s}aa}BC^ih}e|eval;

print $A;

73

▶ Run
#!/usr/bin/perl

$A+=-d'/';

print $A;

74

Date: 2000-09-26

▶ Run
#!/usr/bin/perl

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

print $A;

75

Author: Kai

Date: 2000-09-26

▶ Run
#!/usr/bin/perl

map{$_++}$A;

print $A;

76

Author: BooK 

▶ Run
#!/usr/bin/perl

%_=('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;

77

Author: Stéphane

Date: 2000-10-03

▶ Run
#!/usr/bin/perl

$__ = ($_) = qr|(\ua)| =~ qr|(a)|i; $$_+=$__;

print $A;

78

Author: Kai

Date: 2000-10-06

▶ Run
#!/usr/bin/perl

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

print $A;

79

Author: Stéphane

Date: 2000-10-08

▶ Run
#!/usr/bin/perl

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

print $A;

80

Author: BooK 

Date: 2000-10-10

▶ Run
#!/usr/bin/perl

$A+=\$A/bless\$A||/\A/;

print $A;

81

Author: BooK 

Date: 2000-10-10

▶ Run
#!/usr/bin/perl

$A+=\$A//\A//bless\$A;

print $A;

82

Author: Julien Bordet

Date: 2000-10-12

▶ Run
#!/usr/bin/perl

eval pack("C4", <DATA> =~ m#(\d{2})#g);
__DATA__
36654343;

print $A;

83

Date: 2000-10-12

▶ Run
#!/usr/bin/perl

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;

84

▶ Run
#!/usr/bin/perl

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

print $A;

85

Author: Jean

Date: 2000-10-26

▶ Run
#!/usr/bin/perl

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

print $A;

86

Date: 2000-10-26

▶ Run
#!/usr/bin/perl

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

print $A;

87

Author: Jean

Date: 2000-11-15

▶ Run
#!/usr/bin/perl

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

print $A;

88

Date: 2000-11-15

▶ Run
#!/usr/bin/perl

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

print $A;

89

Date: 2000-11-15

▶ Run
#!/usr/bin/perl

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

print $A;

90

Author: BooK 

Date: 2000-11-22

▶ Run
#!/usr/bin/perl

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

print $A;

91

Author: David Rigaudiere

Date: 2000-11-22

▶ Run
#!/usr/bin/perl

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

print $A;

92

Author: Maddingue

Date: 2000-11-23

▶ Run
#!/usr/bin/perl

${substr(++($b='Z'),0,1)}++;

print $A;

93

Author: Jean

Date: 2000-11-23

▶ Run
#!/usr/bin/perl

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

print $A;

94

Author: BooK 

Date: 2000-11-27

▶ Run
#!/usr/bin/perl

$A -= fork ? die : wait ? wait : die;

print $A;

95

Date: 2000-11-27

▶ Run
#!/usr/bin/perl

$A = (($A<<1)+(1<<1))>>1;

print $A;

96

Date: 2000-11-27

▶ Run
#!/usr/bin/perl

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

print $A;

97

Date: 2000-11-27

▶ Run
#!/usr/bin/perl

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

print $A;

98

Date: 2000-12-02

▶ Run
#!/usr/bin/perl

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

print $A;

99

Date: 2000-12-05

▶ Run
#!/usr/bin/perl

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

print $A;

100

Date: 2000-12-05

▶ Run
#!/usr/bin/perl

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

print $A;

101

Author: Xavier Canehan

Date: 2000-12-06

▶ Run
#!/usr/bin/perl

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

print $A;

102

Author: BooK 

Date: 2000-12-06

▶ Run
#!/usr/bin/perl

$A += fileno STDOUT;

print $A;

103

Date: 2000-12-06

▶ Run
#!/usr/bin/perl

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

print $A;

104

Date: 2000-12-06

▶ Run
#!/usr/bin/perl

$A = 2*(-0.5+($A==abs $A)) * push @_, ((2*($A!=abs $A))..abs $A);

print $A;

105

Date: 2000-12-08

▶ Run
#!/usr/bin/perl

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

print $A;

106

Date: 2000-12-18

▶ Run
#!/usr/bin/perl

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

print $A;

107

Author: arhuman

Date: 2001-02-12

▶ Run
#!/usr/bin/perl

$A += do { reset " " };

print $A;

108

Author: arhuman

Date: 2001-02-12

▶ Run
#!/usr/bin/perl

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

print $A;

109

Author: [beatnik]

Date: 2001-06-04

▶ Run
#!/usr/bin/perl

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

print $A;

110

Author: [beatnik]

Date: 2001-06-04

▶ Run
#!/usr/bin/perl

$A += $A**0;

print $A;

111

Author: [beatnik]

Date: 2001-06-04

▶ Run
#!/usr/bin/perl

$A -= -1;

print $A;

112

Author: François Désarménien

Date: 2001-07-23

▶ Run
#!/usr/bin/perl

$A += 42 == 42;

print $A;

113

Author: Stéphane

Date: 2001-09-10

▶ Run
#!/usr/bin/perl

${<@ >|< !>&~< ">}++;

print $A;

114

Author: Init64

Date: 2001-09-10

▶ Run
#!/usr/bin/perl

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

print $A;

115

Author: Stéphane

Date: 2001-09-11

▶ Run
#!/usr/bin/perl

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

print $A;

116

Author: Jérôme Abela

Date: 2001-09-11

▶ Run
#!/usr/bin/perl

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

print $A;

117

Author: Jérôme Abela

Date: 2001-09-11

▶ Run
#!/usr/bin/perl

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

print $A;

118

Author: Stéphane

Date: 2001-09-17

▶ Run
#!/usr/bin/perl

$A += japh =~ japh;

print $A;

119

Author: Stéphane

Date: 2001-09-17

▶ Run
#!/usr/bin/perl

$A += qr|japh| =~ ':';

print $A;

120

Author: Stéphane

Date: 2001-09-20

▶ Run
#!/usr/bin/perl

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

print $A;

121

Author: Stéphane

Date: 2001-09-17

▶ Run
#!/usr/bin/perl

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

print $A;

122

Author: Eric

Date: 2001-09-26

▶ Run
#!/usr/bin/perl

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

print $A;

123

Author: François Désarménien

Date: 2001-10-24

▶ Run
#!/usr/bin/perl

*Z=*A;
$Z++;

print $A;

124

Author: Stéphane

▶ Run
#!/usr/bin/perl

$A += VIM::Windows();

print $A;

125

Author: Stéphane

Date: 2001-11-03

▶ Run
#!/usr/bin/perl

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

print $A;

126

Author: Stéphane

Date: 2001-11-21

▶ Run
#!/usr/bin/perl

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
# NB: la variable intermédiaire @a est nécessaire!;

print $A;

127

Author: BooK 

Date: 2001-11-27

▶ Run
#!/usr/bin/perl

${substr(\substr($$,0,0),2,1)}++;

print $A;

128

Author: Wesley

Date: 2002-01-03

▶ Run
#!/usr/bin/perl

$A += +$A-- -$A++ +$A-- -++$A;

print $A;

129

Author: Olivier Poitrey

Date: 2002-01-11

▶ Run
#!/usr/bin/perl

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

print $A;

130

Author: Stéphane

Date: 2002-01-21

▶ Run
#!/usr/bin/perl

$ a { 1 } = 1; $A +=eval "$ a { 1 }"; $a=1; $A += eval "$ a { 1 }";

print $A;

131

Author: Stéphane

Date: 2002-01-25

▶ Run
#!/usr/bin/perl

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

print $A;

132

Author: Stéphane

Date: 2002-01-25

▶ Run
#!/usr/bin/perl

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

print $A;

133

Author: BooK 

Date: 2002-02-04

▶ Run
#!/usr/bin/perl

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

print $A;

134

Author: BooK 

Date: 2002-02-04

▶ Run
#!/usr/bin/perl

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

print $A;

135

Author: Christian Aperghis-Tramoni

Date: 2002-04-12

▶ Run
#!/usr/bin/perl

@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;

136

Author: Christian Aperghis-Tramoni

Date: 2002-04-15

▶ Run
#!/usr/bin/perl

$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;

137

Author: Sylvain Lhullier

Date: 2002-04-17

▶ Run
#!/usr/bin/perl

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

print $A;

138

Author: Sylvain Lhullier

Date: 2002-04-17

▶ Run
#!/usr/bin/perl

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

print $A;

139

Author: Sylvain Lhullier

Date: 2002-04-17

▶ Run
#!/usr/bin/perl

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

print $A;

140

Author: Christian Aperghis-Tramoni

Date: 2002-04-18

▶ Run
#!/usr/bin/perl

map {if ($A){$i=$_ eq (pack
"C",(1<<5)+(1<<1)+1)?$i+int(log($A)/log(0xA))+1:$i+1;($_ eq (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;

141

Author: Mtv Europe

Date: 2002-04-21

▶ Run
#!/usr/bin/perl

!$A+++!q!+++A$!;

print $A;

142

Author: Mtv Europe

Date: 2002-04-21

▶ Run
#!/usr/bin/perl

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;

143

Author: Mtv Europe

Date: 2002-04-22

▶ Run
#!/usr/bin/perl

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;

144

Author: Mtv Europe

Date: 2002-04-22

▶ Run
#!/usr/bin/perl

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;

145

Author: Christian Aperghis-Tramoni

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

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

print $A;

146

Author: Christian Aperghis-Tramoni

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

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

print $A;

147

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

$A += length length length $A;

print $A;

148

Author: Olivier "Init64" Matt

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

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

print $A;

149

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

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

print $A;

150

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

$A+=chdir('/');

print $A;

151

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

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

print $A;

152

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

eval{die(($A+1)."\n")};
$A=int($@);

print $A;

153

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

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

print $A;

154

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

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

print $A;

155

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

$A = log(exp($A)*exp(1));

print $A;

156

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

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

print $A;

157

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

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

print $A;

158

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

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

print $A;

159

Author: Sylvain Lhullier

Date: 2002-04-24

▶ Run
#!/usr/bin/perl

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;

160

Author: Maddingue

Date: 2002-04-25

▶ Run
#!/usr/bin/perl

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

print $A;

161

Author: Christian Aperghis-Tramoni

Date: 2002-04-26

▶ Run
#!/usr/bin/perl

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\n";
    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\n";
    close LIT_P;close ECRIT_P;
    exit;
};

print $A;

162

Author: Christian Aperghis-Tramoni

Date: 2002-04-30

▶ Run
#!/usr/bin/perl

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;

163

Date: 2002-04-30

▶ Run
#!/usr/bin/perl

''=~('('.'?'
           .'{'.(                   '`'|'%').("\["^
        '-').('`'|                '!').('`'|',').'"'
 .'\\'.'$'.  ("\`"^              '!').('{'^'[')."\+".
'+'.';'.('!'^('+')).            '"'.'}'.')');$:=('.')^
'~';$~='@'|'(';$^=')'          ^'[';$/='`'|'.';$_='('^
  '}';$,='`'|"\!";$\=        ')'^'}';$:='.'^'~';$~='@'|
       '(';$^=')'^'['      ;$/='`'|'.';$_='('^'}';$,='`'
      |'!';$\=(')')^     '}';$:='.'^'~';$~='@'|'(';$^=')'
     ^'[';$/='`'|'.'   ;$_='('^'}';$,='`'|'!';$\=')'^"\}";
    $:='.'^"\~";$~=   '@'|'(';$^=')'^'[';$/='`'|'.';$_="\("^
    '}';$,='`'|'!';  $\=')'^'}';$:='.'^'~';$~='@'|'(';$^=')'^
    '[';$/='`'|'.'  ;$_='('^'}';$,='`'|'!';$\=')'^'}';$:='.'^
    '~';$~='@'|'('  ;$^=')'^'[';$/='`'|'.';$_='('^'}';$,="\`"|
    '!';$\=')'^'}';$:='.'^'~';$~='@'|'(';$^=')'^'[';$/='`'|'.'
    ;$_='('^'}';$,='`'|'!';$\=')'^'}';$:='.'^'~';$~='@'|'(';$^=
     ')'^'[';$/='`'|'.';$_='('^'}';$,='`'|'!';$\=')'^'}';$:='.'
     ^'~';$~='@'|'(';$^=')'^'[';$/='`'|'.';$_='('^'}';$,='`'|'!'
      ;$\=')'^'}';$:='.'^'~';$~='@'|'(';$^=')'^'[';$/='`'|'.';$_=
       '('^'}';$,='`'|'!';$\=')'^'}';$:='.'^'~';$~='@'|'(';$^=')'
        ^'[';$/='`'|'.';$_='('^'}';$,='`'|'!';$\=')'^"\}";$:= '.'
         ^'~';$~='@'|'(';$^=')'^'[';$/='`'|'.';$_='('^'}';$,  =((
          '`'))|'!';$\=')'^'}';$:='.'^'~';$~=('@')| "\(";$^=  ')'
            ^'[';$/='`'|'.';$_='('^'}';$,='`'|'!';  $\=')'^   '}'
             ;($:) ='.'^'~';$~='@'|'(';$^=')'^'['   ;$/='`'   |((
                   '.'));$_='('^'}';$,='`'|"\!";    $\=')'^   '}'
                   ;$:='.'^    '~';$~='@' |"\(";     $^=')'   ^+
                   '[';$/=     '`'|'.';   $_='('     ^"\}";  $,
                   =('`')|     "\!";$\=   "\)"^       "\}";  (
                   ($:))=      '.'^'~';   ($~)         ='@'
                   |"\(";     $^=(')')^   '[';         ($/)
                    ='`'|     "\.";$_=    '('^         '}';
                    ($,)=     '`'|'!'     ;$\=         ')'^
                    '}';     $:='.'       ^'~'         ;$~=
                    '@'|     '('          ;$^=         ')'^
                    '[';      $/=         '`'          |((
                    '.'        ));       $_=           '('
                    ^((         '}'     ));            $,=
                    '`'          |((   '!'              ))
                    ;(             ($\))=               ((
                    ((              ')'))               ))
                    ^+             "\}";$:=             ((
                   '.'            ))^+ "\~";            $~
                  =((           '@'))|  '(';           $^=
                 ')'^         "\[";$/=   '`'          |'.'
               ;($_)=                                ('(')^
             "\}";$,=                               '`'|'!';

print $A;

164

Date: 2002-04-30

▶ Run
#!/usr/bin/perl

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

print $A;

165

Date: 2002-04-30

▶ Run
#!/usr/bin/perl

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

print $A;

166

Date: 2002-04-30

▶ Run
#!/usr/bin/perl

use Fcntl;
$A += F_GETFD;

print $A;

167

Date: 2002-04-30

▶ Run
#!/usr/bin/perl

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

print $A;

168

Date: 2002-04-30

▶ Run
#!/usr/bin/perl

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

print $A;

169

Date: 2002-04-30

▶ Run
#!/usr/bin/perl

use POSIX;
$A += &ENOMEM - &EAGAIN;

print $A;

170

Author: Christian Aperghis-Tramoni

Date: 2002-04-30

▶ Run
#!/usr/bin/perl

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

print $A;

171

Date: 2002-04-30

▶ Run
#!/usr/bin/perl

#define $ /* Money for nothing */
$ A++;

print $A;

172

Author: Stéphane

Date: 2002-05-01

▶ Run
#!/usr/bin/perl

$A = $A++ ? $A++ : $A++;

print $A;

173

Author: Stéphane

Date: 2002-05-16

▶ Run
#!/usr/bin/perl

$A += !('_'| !'_')  # where !(A|!A) == 1;

print $A;

174

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run
#!/usr/bin/perl

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

print $A;

175

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run
#!/usr/bin/perl

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

print $A;

176

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run
#!/usr/bin/perl

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

print $A;

177

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run
#!/usr/bin/perl

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;

178

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run
#!/usr/bin/perl

$A += int(rand(1)+1);

print $A;

179

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run
#!/usr/bin/perl

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;

180

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run
#!/usr/bin/perl

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

print $A;

181

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run
#!/usr/bin/perl

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

print $A;

182

Author: Sylvain Lhullier

Date: 2002-05-23

▶ Run
#!/usr/bin/perl

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

print $A;

183

Author: Stéphane

Date: 2002-05-28

▶ Run
#!/usr/bin/perl

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

print $A;

184

Author: Maddingue

Date: 2002-05-29

▶ Run
#!/usr/bin/perl

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

print $A;

185

Author: Christian Aperghis-Tramoni

Date: 2002-05-30

▶ Run
#!/usr/bin/perl

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

print $A;

186

Author: Christian Aperghis-Tramoni

Date: 2002-05-30

▶ Run
#!/usr/bin/perl

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--,"\n");
    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,"\n"));
    close LIT_P;close ECRIT_P;
    exit;
  }
};

print $A;

187

Author: Christian Aperghis-Tramoni

Date: 2002-05-31

▶ Run
#!/usr/bin/perl

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

print $A;

188

Author: Christian Aperghis-Tramoni

Date: 2002-06-04

▶ Run
#!/usr/bin/perl

$_=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;

189

Author: François Désarménien

Date: 2002-06-05

▶ Run
#!/usr/bin/perl

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

print $A;

190

Author: Stéphane

Date: 2002-06-05

▶ Run
#!/usr/bin/perl

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

print $A;

191

Date: 2002-06-05

▶ Run
#!/usr/bin/perl

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

print $A;

192

Author: Jean Forget

Date: 2002-06-07

▶ Run
#!/usr/bin/perl

eval v36.65.43.43;

print $A;

193

Author: Stéphane

Date: 2002-06-08

▶ Run
#!/usr/bin/perl

use constant; my constant $A++;

print $A;

194

Author: Stéphane

Date: 2002-06-08

▶ Run
#!/usr/bin/perl

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

print $A;

195

Author: Stéphane

Date: 2002-06-08

▶ Run
#!/usr/bin/perl

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

print $A;

196

Author: Stéphane

Date: 2002-06-14

▶ Run
#!/usr/bin/perl

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

print $A;

197

Author: Christian Aperghis-Tramoni

Date: 2002-06-21

▶ Run
#!/usr/bin/perl

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

print $A;

198

Author: Maddingue

Date: 2002-06-22

▶ Run
#!/usr/bin/perl

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

print $A;

199

Author: Sylvain Lhullier

Date: 2002-06-24

▶ Run
#!/usr/bin/perl

#Fichier Makefile.PL
use ExtUtils::MakeMaker;
WriteMakefile( NAME => 'PlusPlus', VERSION_FROM => 'PlusPlus.pm');

#Fichier 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;

200

Author: Sylvain Lhullier

Date: 2002-06-24

▶ Run
#!/usr/bin/perl

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)."\n";
   close $t; close $s;
   exit(0);
}
else
{
   sleep 1;
   $s = new IO::Socket::INET(PeerAddr=>hostname(),PeerPort=>8888);
   print $s "$A\n";
   $A = int(<$s>);
   close $s;
};

print $A;

201

Author: Sylvain Lhullier

Date: 2002-06-24

▶ Run
#!/usr/bin/perl

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

print $A;

202

Author: Sylvain Lhullier

Date: 2002-06-24

▶ Run
#!/usr/bin/perl

$A=-(-1-$A);

print $A;

203

Author: Sylvain Lhullier

Date: 2002-06-24

▶ Run
#!/usr/bin/perl

$A = -$A;
$A--;
$A = -$A;

print $A;

204

Author: Sylvain Lhullier

Date: 2002-06-24

▶ Run
#!/usr/bin/perl

$A = 1 + $A;

print $A;

205

Author: Sylvain Lhullier

Date: 2002-06-24

▶ Run
#!/usr/bin/perl

++$A;

print $A;

206

Date: 2002-06-24

▶ Run
#!/usr/bin/perl

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

print $A;

207

Date: 2002-06-24

▶ Run
#!/usr/bin/perl

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

print $A;

208

Author: Stéphane

Date: 2002-07-08

▶ Run
#!/usr/bin/perl

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

print $A;

209

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

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;

210

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

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

print $A;

211

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

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

print $A;

212

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

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

print $A;

213

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

use URI::Escape;
eval uri_unescape('%24%41%2B%2B');

print $A;

214

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

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

print $A;

215

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

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

print $A;

216

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

eval reverse '++A$';

print $A;

217

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

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

print $A;

218

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

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

print $A;

219

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

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

print $A;

220

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

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

print $A;

221

Author: Sylvain Lhullier

Date: 2002-07-11

▶ Run
#!/usr/bin/perl

$A += $A !~ santana;

print $A;

222

Author: Sylvain Lhullier

Date: 2002-07-15

▶ Run
#!/usr/bin/perl

$A += unshift @A, $A;

print $A;

223

Author: Sylvain Lhullier

Date: 2002-07-15

▶ Run
#!/usr/bin/perl

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

print $A;

224

Author: Sylvain Lhullier

Date: 2002-07-15

▶ Run
#!/usr/bin/perl

$A{$A}=\$A;${$A{$A}}++;

print $A;

225

Author: Sylvain Lhullier

Date: 2002-07-15

▶ Run
#!/usr/bin/perl

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;

226

Author: Sylvain Lhullier

Date: 2002-07-15

▶ Run
#!/usr/bin/perl

s//$A++/e;

print $A;

227

Author: Stéphane

Date: 2002-07-22

▶ Run
#!/usr/bin/perl

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

print $A;

228

Author: Stéphane

Date: 2002-07-22

▶ Run
#!/usr/bin/perl

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

print $A;

229

Author: Stéphane

Date: 2002-07-22

▶ Run
#!/usr/bin/perl

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

print $A;

230

Author: Stéphane

Date: 2002-07-22

▶ Run
#!/usr/bin/perl

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

print $A;

231

Author: Rafael Garcia-Suarez

Date: 2002-07-26

▶ Run
#!/usr/bin/perl

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;

232

Date: 2002-08-06

▶ Run
#!/usr/bin/perl

use Acme::Bleach;

print $A;

233

Date: 2002-08-06

▶ Run
#!/usr/bin/perl

use Acme::Morse;
.--.-..--..---.-.--..--.-..--..---.-.--.
..-..-..-.....-.--.-.-..--.-.-..--.---..
.-.-...;

print $A;

234

Author: Didier Collin

Date: 2002-08-21

▶ Run
#!/usr/bin/perl

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

print $A;

235

Author: Court-Jus

Date: 2002-09-25

▶ Run
#!/usr/bin/perl

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

print $A;

236

Author: BooK 

Date: 2002-09-27

▶ Run
#!/usr/bin/perl

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

print $A;

237

Author: Stéphane

Date: 2002-09-30

▶ Run
#!/usr/bin/perl

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

print $A;

238

Author: Philippe Rimbault

Date: 2002-10-28

▶ Run
#!/usr/bin/perl

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

print $A;

239

Date: 2002-11-03

▶ Run
#!/usr/bin/perl

#--------Free incrementation voucher-----------8<----Cut Here-----------#
$                                                                       {
(                                  '$'                                  )
^                                  'A'                                  ^
(                                  '='                                  )
&                                  '$'                                  |
(                                  'A'                                  )
&                                  '+'                                  &
(                                  '1'                                  )
&                                  ';'                                  }
++                                                                      ;
#---Découper suivant les pointilles--->8---Bon d'augmentation gratuit---#;

print $A;

240

Author: Simon Maréchal

Date: 2002-11-14

▶ Run
#!/usr/bin/perl

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

print $A;

241

Author: Simon Maréchal

Date: 2002-11-14

▶ Run
#!/usr/bin/perl

($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;

242

Date: 2002-11-19

▶ Run
#!/usr/bin/perl

eval <<'';
$A++;

print $A;

243

Date: 2002-11-19

▶ Run
#!/usr/bin/perl

eval '$A'.  (<<""
$A++

=~ m|(\W+)|)[0];

print $A;

244

Date: 2002-11-24

▶ Run
#!/usr/bin/perl

use strict; my  strict $A++;

print $A;

245

Date: 2002-11-24

▶ Run
#!/usr/bin/perl

my main $A++;

print $A;

246

Date: 2002-11-24

▶ Run
#!/usr/bin/perl

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

print $A;

247

Date: 2002-11-24

▶ Run
#!/usr/bin/perl

$A += nil +1  if  nil;

print $A;

248

Date: 2002-11-24

▶ Run
#!/usr/bin/perl

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

print $A;

249

Date: 2002-11-24

▶ Run
#!/usr/bin/perl

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

print $A;

250

Date: 2002-12-01

▶ Run
#!/usr/bin/perl

use less; $A +=require  strict if useless; use if;

print $A;

251

Date: 2002-12-07

▶ Run
#!/usr/bin/perl

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

print $A;

252

Author: Julien Gilles

Date: 2002-12-12

▶ Run
#!/usr/bin/perl

$A = 2**32-~$A;

print $A;

253

Author: Julien Gilles

Date: 2002-12-12

▶ Run
#!/usr/bin/perl

$A = 2**64-~$A;

print $A;

254

Date: 2002-12-19

▶ Run
#!/usr/bin/perl

$
B
=
\
$
A
;
$
A
=
$
$
B
+
1;

print $A;

255

Date: 2003-01-10

▶ Run
#!/usr/bin/perl

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

print $A;

256

Date: 2003-01-10

▶ Run
#!/usr/bin/perl

$  A+= .5=> .5>= .5;$ A+=(1  =>.5);

print $A;

257

Date: 2003-01-31

▶ Run
#!/usr/bin/perl

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

print $A;

258

Author: Sébastien Morin

Date: 2003-02-19

▶ Run
#!/usr/bin/perl

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

print $A;

259

Date: 2003-03-27

▶ Run
#!/usr/bin/perl

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

print $A;

260

Author: Robin Berjon

Date: 2003-05-02

▶ Run
#!/usr/bin/perl

use Lingua::Romana::Perligata;
ao postincresce.;

print $A;

261

Author: Robin Berjon

Date: 2003-05-02

▶ Run
#!/usr/bin/perl

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

print $A;

262

Author: Nicholas Clark

Date: 2003-05-04

▶ Run
#!/usr/bin/perl

${chr($=+((ord($/))>>$$/$$))}++;

print $A;

263

Author: Nicholas Clark

Date: 2003-05-05

▶ Run
#!/usr/bin/perl

${~$/&~$;&$^}++;

print $A;

264

Author: Nicholas Clark

Date: 2003-05-05

▶ Run
#!/usr/bin/perl

perl -le '${~$\&~$;&$^}++';

print $A;

265

Author: Greg McCaroll

Date: 2003-06-21

▶ Run
#!/usr/bin/perl

$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\n";

print $A;

266

Author: Guillaume Rousse

Date: 2003-06-24

▶ Run
#!/usr/bin/perl

urpmf --name -v -e  '($a || ++$a) && 0';

print $A;

267

Author: François Pons

Date: 2003-06-24

▶ Run
#!/usr/bin/perl

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

print $A;

268

Author: François Pons

Date: 2003-06-24

▶ Run
#!/usr/bin/perl

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

print $A;

269

Author: Philippe Rimbault

Date: 2003-11-13

▶ Run
#!/usr/bin/perl

$A+=`pidof init`;

print $A;

270

Author: Philippe Rimbault

Date: 2003-11-14

▶ Run
#!/usr/bin/perl

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

print $A;

271

Author: Philippe Rimbault

Date: 2003-12-04

▶ Run
#!/usr/bin/perl

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

print $A;

272

Author: Philippe Rimbault

Date: 2003-12-04

▶ Run
#!/usr/bin/perl

$;=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;

273

Author: Christophe Grosjean

Date: 2004-01-05

▶ Run
#!/usr/bin/perl

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

print $A;

274

Date: 2004-01-19

▶ Run
#!/usr/bin/perl

${*{$main::{A}}{ref \$A}}++;

print $A;

275

Author: Christophe Renard

Date: 2004-01-19

▶ Run
#!/usr/bin/perl

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;

276

Author: Pied Axioplase

Date: 2004-02-05

▶ Run
#!/usr/bin/perl

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\n";

        print $socket "GET /aplusplus.html\n";
        $reply = <$socket>;

        while($reply){
                $title=$reply if ($reply=~/<title>/i);
                $reply=<$socket>;

        }
        print $title;
        $title=~s#<.{5,6}>##g;
        $title=~s/(..)(..)/$2$1/;
        print $title;
        return $title;
};

print $A;

277

Author: Olivier Mengué

Date: 2004-02-05

▶ Run
#!/usr/bin/perl

eval pack('N', 608250667);

print $A;

278

Author: Damien Krotkine

Date: 2004-05-13

▶ Run
#!/usr/bin/perl

$A=()=(0..$A);

print $A;

279

Author: Rafael Garcia-Suarez

Date: 2004-05-14

▶ Run
#!/usr/bin/perl

$A=~/(?{++$_})(?{$A=$^R})/;

print $A;

280

Date: 2004-06-11

▶ Run
#!/usr/bin/perl

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

print $A;

281

Author: Philippe "BooK" Bruhat

Date: 2004-06-30

▶ Run
#!/usr/bin/perl

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

print $A;

282

Author: Olivier Mengué

Date: 2004-10-27

▶ Run
#!/usr/bin/perl

echo +ACQ-A+-+- | perl -Mencoding=UTF-7;

print $A;

283

Author: Philippe "BooK" Bruhat

Date: 2004-10-29

▶ Run
#!/usr/bin/perl

;$A++; # 20g1+20p@;

print $A;

284

Author: Philippe "BooK" Bruhat

Date: 2004-10-29

▶ Run
#!/usr/bin/perl

# <@p11+1g11
$A++;

print $A;

285

Author: Olivier Mengué

Date: 2004-10-29

▶ Run
#!/usr/bin/perl

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;

286

Author: Andrew Savige

Date: 2004-11-03

▶ Run
#!/usr/bin/perl

$A-=$----$----$----$----$----!$-;

print $A;

287

Date: 2004-12-14

▶ Run
#!/usr/bin/perl

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

print $A;

288

Date: 2005-01-27

▶ Run
#!/usr/bin/perl

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

print $A;

289

Author: Vincent Storez

Date: 2005-05-25

▶ Run
#!/usr/bin/perl

$A += ( $A =~ m+$A$+m );

print $A;

290

Author: Gaal Yahas

Date: 2005-06-04

▶ Run
#!/usr/bin/perl

our $A; $::(<A>)++;

print $A;

291

Author: Fabien Venzac

Date: 2005-07-28

▶ Run
#!/usr/bin/perl

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

print $A;

292

Author: Gilles Arcas

Date: 2006-01-29

▶ Run
#!/usr/bin/perl

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

print $A;

293

Author: Sébastien "Maddingue" Aperghis-Tramoni

Date: 2006-08-03

▶ Run
#!/usr/bin/perl

$A += !!(!!($!||!$!)x!!($!||!$!))x!!(!!($!||!$!)x!!($!||!$!));

print $A;

294

Author: Christian Aperghis-Tramoni

Date: 2006-11-28

▶ Run
#!/usr/bin/perl

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

print $A;

295

Author: Christian Aperghis-Tramoni

Date: 2006-11-30

▶ Run
#!/usr/bin/perl

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

print $A;

296

Author: Damien Krotkine

Date: 2007-01-18

▶ Run
#!/usr/bin/perl

$A += !int\\\y////\\\\y////\\\\y////\\\\y///;

print $A;

297

Author: Damien Krotkine

Date: 2007-01-18

▶ Run
#!/usr/bin/perl

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

print $A;

298

Author: Sébastien "Maddingue" Aperghis-Tramoni

Date: 2007-01-30

▶ Run
#!/usr/bin/perl

$A+=///////////////////////;

print $A;

299

Author: Sébastien "Maddingue" Aperghis-Tramoni

Date: 2007-01-30

▶ Run
#!/usr/bin/perl

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

print $A;

300

Author: Christian Aperghis-Tramoni

Date: 2007-02-06

▶ Run
#!/usr/bin/perl

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;

301

Date: 2007-02-07

▶ Run
#!/usr/bin/perl

use Acme::DonMartin;
sittzle shpliple spla pwadak sklork wap splork flif foomp ting rumble
sprizawitz clack;

print $A;

302

Date: 2007-02-07

▶ Run
#!/usr/bin/perl

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

print $A;

303

Date: 2007-02-07

▶ Run
#!/usr/bin/perl

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;

304

Author: Philippe "BooK" Bruhat

Date: 2007-02-07

▶ Run
#!/usr/bin/perl

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

print $A;

305

Date: 2007-02-07

▶ Run
#!/usr/bin/perl

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

print $A;

306

Date: 2007-02-07

▶ Run
#!/usr/bin/perl

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

print $A;

307

Date: 2007-02-07

▶ Run
#!/usr/bin/perl

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

print $A;

308

Date: 2007-02-07

▶ Run
#!/usr/bin/perl

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

print $A;

309

Date: 2007-02-09

▶ Run
#!/usr/bin/perl

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

Comments