http://www.perlmonks.org?node_id=45534


in reply to Life at the Monastery. Chapter 1

I got to thinking from current CB topics:

If there is a Torture Chamber at the Monastery one would see scenes like this:

"So FouRPlay, what is the regex for getting the last digit of pi?"

Replies are listed 'Best First'.
Re: Re: Life at the Monastery. Chapter 1
by turnstep (Parson) on Dec 07, 2000 at 22:23 UTC

    That's an easy one:

    if ($PI =~ m/(\d)$/) { print "The last digit is $1.\n"; } else { print "Seems that pi does not end in a digit. Who knew?\n"; }

    The hard part is assigning the correct value to the scalar $PI.... :)