Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
May the source be with you, but remember the KISS principle ;-)
Skepticism and critical thinking is not panacea, but can help to understand the world better

Softpanorama 92a (vol.9, No.3)

Computer Humor

The Perl Purity Test

Version 1.01, October 30, 1992

Written by Jeff Okamoto

With Help from Tom Christiansen

This is similar to other Purity Tests, of which perhaps the most famous is the Unisex, Omnisexual Purity Test that can be found in Additions are welcome. Please send them to

All questions begin with "Have you ever..." Answer each question with a "yes" or "no". Keep track of how many "yes" answers you give. When finished, subtract that number from the total number of questions, then divide by the number of questions to get a percentage. This percentage is your perl purity. There are 125 questions in this version.


... rewritten a Unix command in perl?

... rewritten a DOS command in perl?

... emulated a kernel feature inside a program in perl?

... written a compressor/decompressor using pack?

... written scripts that generate other scripts?

... used undocumented features?


... used reserved keywords as variable names?

... used $x, @x, and %x in a script?

... used $x, @x, %x, and *x in a script?

... not gotten confused when you used $x, @x, %x, and *x all in that script?

... written a script with no alphabetic characters in it?

... no alphanumeric characters in it?

... used variables with control-characters other than ones already defined?

... created variables at runtime?


... used lists of lists?

Associative Arrays

... used associative array operators on the main symbol table?


... created functions at runtime?

... written a function that returns different types? (e.g., scalar, list, etc.)

... called a subroutine with the & operator and no arguments so that the

child function inherited what remains of the caller’s argument stack, @_?

... changed function definitions on the fly?

... used wantarray?

... returned a "0 but true" scalar?

Loop Controls

... used do BLOCK inside an EXPR?

... used loop controls (e.g., last, next, etc.) from inside a signal handler?

... created a loop label at runtime?


... used the scalar ".." operator?

... used it with things other than line numbers, array indices, or regexps?

... used syscall?

Searching and Replacing

... used the /e switch?

... used the /ee switch?

... used a /eee or higher number of e’s in a switch?



... used arrays of file handles?

... used indirect file handles?

... used doubly indirect file handles?

... used a directory handle as a file handle?

... and gotten away with it?

... used a file handle as a directory handle?

... and gotten away with it?



... used all nine sets of parentheses in a regexp?

... used more than nine sets of parentheses in a regexp?

... used nested parentheses in a regexp?

... wished for an equivalent to LISP’s meta-close character "]", which closes all currently open parentheses?


... used grep on non-arrays?

... nested grep within another grep (for a total of two greps)?

... nested up to five greps within one statement?

... nested more thann five greps within one statement?


... written self-modifying evals?

... used eval to test for features your brain-damaged version of Unix doesn’t have?

... used eval/die to emulate setjmp/longjmp?

... nested an eval inside another eval (for a total of two nested evals)?

... used up to five nested evals?

... used more than five nested evals?


... used references?

... used lists of references?

... used associative arrays of references?

... lost your referents and didn’t care?



... used stream sockets?

... used datagram sockets?

... used RPC?


... used the -D flag?

... used the -D1024 flag?

... figured out what all that debugging info meant?

... used the perl debugger?

... modified the perl debugger?



... written your own package?

... used packages to emulate structures?

... referenced a package’s symbol table via %_packagename?

User Subroutines

... gotten frustrated with the documentation of how to link in user subroutines?

... written a subroutine to be linked in with uperl.o so that your routine can be called from a perl script?

... replaced your version of perl with a version that has your subroutine(s)?


... abused dynamic scoping by fudging @ARGV?

... abused dynamic scoping and changed the names of functions?


... debugged the result of h2ph?

... hacked on h2ph?



... debugged the result of c2ph?

... hacked on c2ph?

... ported gcc so you can use c2ph?

Heavy Wizardry

... used autoloading functions?

The Source of Taintedness

... used taintperl?

... tried to subvert the TAINT checks?

... read the source to see what happens if you successfully subvert the TAINT checks?

... changed the source to change what happens if you successfully subvert the TAINT checks?

... tried to read the source?

... found the comment "/* Heavy wizardry */" other than by deliberately searching for it now that you know it exists?

The Father, the Son, and the Holy Ghost

... sent mail to Larry asking for help?

... sent mail to Larry reporting a bug in perl?

... sent mail to Larry requesting a feature?

... gotten a reply from Larry (as opposed to his autoreplier)?

... gotten more than ten autoreplies from Larry?

... sent mail to Randal asking for help?

... sent mail to Randal reporting a bug in perl?

... sent mail to Randal with an idea for a JAPH script?

... sent mail to Tom asking for help?

... sent mail to Tom reporting a bug in perl?

... sent mail to Tom pointing out an error in his slides?

... had a requested feature be included in a subsequent set of patches?

... had up to five requested features included?

... had more than five requested features included?


... written a "Just another Perl hacker" script?

... written five or less JAPH scripts?

... written more than five JAPH scripts?

... written any perl poems?

... run these perl poems?

Other Fun Stuff

... used unquoted strings?

... used them unintentionally?

... seeked on __DATA__ to reread your script?

... tried to use a bi-directional pipe?

... realized why this is a waste of time?

... used co-routines in a perl script?

... written a script that used command-line switches?

... used up to five command-line switches?

... more than five command-line switches?

... written a script with its own man page embedded in it?

... counted how many perl functions are overloaded?

The Torah and Talmud of Perl

... referred to the Perl book?

... bought the Perl book?

... bought multiple copies because you wore out the previous copies?

... owned more than one edition of the Perl book?

... owned more than one copy of every edition of the Perl book?

... wondered why Larry and Randall chose a camel for the cover?

... found out why Larry and Randall chose a camel?

... read comp.lang.perl?

... posted to comp.lang.perl?

... applied a kill file to comp.lang.perl?


Perl is Copyright 1989, 1990, 1991 by Larry Wall The Perl Book, "Programming Perl", is written by Larry Wall and Randal L. Schwartz, published by O’Reilly and Associates, Inc. ISBN 0-937175-64-1


The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D

Copyright 1996-2018 by Dr. Nikolai Bezroukov. was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) in the author free time and without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to make a contribution, supporting development of this site and speed up access. In case is down you can use the at


The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Created: May 16, 1997; Last modified: March 12, 2019