NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

## All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.

Full
Abbreviated
Hidden
• #### TIMTOWTDI in action and \$A++(Score:1)

We Paris Perl Mongers have not tried to compute 1+1 , but we have tried to add 1 to the variable \$A. See the results in http://paris.mongueurs.net/aplusplus.html [mongueurs.net]
• #### use the award-winning Inline module(Score:1)

use Inline C => <<'EOC';

int one_plus_one() {
return 1 + 1;
}

EOC

print one_plus_one();
--
We are Perl. Your table will be assimilated. Surrender your beer. Resistance is futile.
• #### pid nastiness(Score:1)

While not particularly obfuscated on its own, encountering this in a large program may be particularly hairy. \$\$/\$\$+\$\$/\$\$
• #### Ideas for solutions(Score:1)

Create a class One and overload the '+' operator for that class.

Write the binary logic by hand using and (&), or (|), xor (^), shifts (<<, and >>), and simple loops.

Go wacky with Roman numerals.

Other wacky code snippets:
"1+"+"+1"

"1+1"+"1+1"

\$\=\$/;"1+1"=~/(.)[+](.)/; print \$++\$+;

print print."+".print."=".((print)+(print))."\n";
• #### Gotta love recursion(Score:1)

use POSIX qw(ceil);

my \$one_plus_one = sum(ceil(rand), cos());

sub sum {
@_ && (shift)- -sum(@_);
}

btw - this code will fail to produce a correct answer every once in a while :)
• #### store the data in the program(Score:1)

my \$val;

sysseek(DATA, -10, 2);

\$val += \$val;
print "\$val\n";
1
__END__

Oh, for a CODE tag like on PerlMonks...

• #### Re:store the data in the program(Score:1)

```CODE? You mean like this? my \$val; sysseek(DATA, -10, 2); sysread(DATA, \$val, 1); \$val += \$val; print "\$val\n"; 1 __END__ ```
• #### Re:store the data in the program(Score:1)

If I were smarter, I would have either consulted the Everything source to verify that there's no special hackery, or the HTML & XHTML book.

pudge, you're my hero once again.