http://www.perlmonks.org?node_id=134608
Category: Miscellaneous
Author/Contact Info Termix
Description:

What happens when you have too much time on your hands and you are getting drunk on vodka with a russian mathematician? Well, you get to proving that trancendental numbers are really digit sequences of uniform distribution over the 0 to 9 range.

Now that I am sober, I don't understand much of the reason behind all that, but this is a pretty nifty tool to print the relative density of digits in any numeric sequence. You can even use 'bc' or another arbitrary precision calculator to generate your large numbers.

How can we make this obfuscated?

Thanks japhy for your help. I've incorporated the smaller reader.

Actually looking at your array duplication, I can further take out the inner for loop.

#!/usr/bin/perl
#script.pl
#basically read all the input, separate the digits, and
#then figure out how many of each are there.

#@p=split(//,'0000000000');
#map ($_ =~ s/\D//g, @x=<>);
#map ( {$p[$_]++;$c++}  split(//,join('',@x)));
#print join("\n", map({ $l=$m++.' -->';for ($k=0;$k<($_/$c)*100;$k++) 
+{ $l.="*"; }; $l; }  @p))."\n";

@p=(0)x10;
$_=join '', <>;
++$c&&$p[$&]++while/\d/g;
print join("\n", map({ $m++.' -->'.(('*')x(($_/$c)*100));}  @p))."\n";


# use with bc as 
# echo "space 20;sqrt(2)" | bc -lq | script.pl