Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
executable file 25 lines (19 sloc) 523 Bytes
# Display Pi to N places, where N is the size of this file, to the byte.
# The spec didn't say "Calculate Pi..." so stuff that, grab the digits
# we need off the internet:-)
use strict;
use warnings;
use Data::Dumper;
use LWP::Simple;
my $size = shift // -s $0;
my $url = "";
my $f = "/tmp/pi1m";
unless(-f $f)
getstore($url,$f) || die "can't retrieve $url\n";
open(my $infh, '<', $f) || die "can't open $f\n";
sysread($infh, my $content, $size);
print "$content\n";
You can’t perform that action at this time.