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


in reply to My Perl code can be understood by...

This poll was triggered by the frequently heard comments of non-Perl developers that follow along the lines of Perl code being obfuscated by definition. For mostly evangelical reasons, I try to make my Perl code understandable by the novice. Where ever I happen to be working, sooner or later, I start writing Perl code to assist with other development work. For example, even though I was brought on where I am now to do C++ work, the first code written was some Perl scripts/modules to parse and analyze the data in some 55,000 log files to verify if proposed changes would actually help the customer. As is typically the case, no one else in my group knows Perl. By writing well commented Perl that minimizes code combinations, eliminates implied variable names, and uses named variables as much as possible, I hope that those who look at the code will not be scared off, but realize that Perl code can be written, which can be understood by those not well versed in the language. While writing code this way may not be the most efficient in terms of processing, I feel CPUs are fast enough that the evangelical benefits outweigh the loss in processing efficiency. As an added benefit, this practice helps reduce the applicability of the last three poll items.