#!/usr/bin/perl # author: Keith Simmons require 'portal.lib'; &parseIn(); print "Content-type: text/html\n\n"; print "\n\nkeith simmons - revelation to pi"; print "\n"; print "\n\n\n
";

@pi = ("3","1","4","1","5","9","2","6","5","3","5","8","9","7","9","3","2","3","8","4","6","2","6","4","3","3","8","3","2","7","9","5","0","2","8","8","4","1","9","7","1","6","9","3","9","9","3","7","5","1","0","5","8","2","0","9","7","4","9","4","4","5","9","2","3","0","7","8","1","6","4","0","6","2","8","6","2","0","8","9","9","8","6","2","8","0","3","4","8","2","5","3","4","2","1","1","7","0","6","7","9","4");

if ( $formdata{'start'} ) {
	$start = $formdata{'start'};
	
	if ( $start > 1000 ) {
		$start = 1000;
	}	

}

if ( $formdata{'offset'} ) {
	$offset = $formdata{'offset'};

	if ( $offset > 66 ) {
		$offset = 66;
	}
	
	for( $i = 0; $i < $offset; $i++ ) {
		shift @pi;
	}
}

open (INSTRM, "revjohn.txt");
@filecont = ;
close (INSTRM);

foreach $line (@filecont) {
	$line =~ s/\d?\d:\d?\d//g;
	$line =~ s/\n/ /g;
	@fileparsed = (@fileparsed, split (/\s+/,$line));
}

for ( $i = 0; $i < $start; $i++ ) {
	shift @fileparsed;
}

for ( $i = 0; $i < 33; $i++ ) {
	$count++;

	for ( $j = 0; $j < @pi[$i]; $j++) {
		shift @fileparsed;
	}
	
	until (@fileparsed[0] =~ m/\w*/) {
		shift @fileparsed;
	}
	
	print @fileparsed[0];
	if ($count ne 3) {
		print " ";
	}

	if ($count eq 3) {
		print "\n";
		$count=0;
	} 

	shift @fileparsed;
}

print "\n
\n

[back]"; print "\n\n";