CGI and Perl

Random subroutines in Perl

I’ll bet your first question might be “why on earth would I ever want to call subroutines randomly?”. Admittedly, it isn’t a need that comes up that often, but (for example) it’s used right here on this very page that you are reading.

Log Script Use

How many old, unused (or under-used) CGI scripts do you have lingering on your server, taking up space? You may not be as guilty of abandoning CGI software in lieu of newer versions as we are (we’ve been creating, and testing software on the same server for 8 years) but odds are you’ve got a few dusty, unused scripts lurking about.

Bit Vector, Using Perl Vec

A bit vector is just an array of bits; subsets of bits within the bytes have some meaning. That allows more compact storage for certain types of data. For example, if you only needed boolean on-off values, you can store eight values in one byte.

Bit Vector, Using Perl Vec

A bit vector is just an array of bits; subsets of bits within the bytes have some meaning. That allows more compact storage for certain types of data. For example, if you only needed boolean on-off values, you can store eight values in one byte.

Creating Perl Modules for Web Sites

When you are writing your own code, you are more apt to use someone else’s module than write your own, unless your project gets fairly large and complex. Small scripting tasks just don’t need the advantages modules offer.

Build a Perl/CGI Voting System

Many Web-deployed applications are written within elaborate database-driven server-side development frameworks such as PHP and Java™ servlets, but for simple applications (for example, where the entire dataset fits comfortably within a Web server’s RAM), data persistence can be easily accomplished using locked DBM files in conjunction with the Perl MLDBM module. This article presents a real-world example — a Web-based voting application — that highlights the use of minimal external modules, forgoes using client-based cookies, and takes advantage of CGI attributes.

Perl Range Operator

In a list context, this operator is easy to use and understand. It is much more confusing in a scalar context, and is often badly explained in books and webpages.

Creating Perl Modules for Websites

When you are writing your own code, you are more apt to use someone else’s module than write your own, unless your project gets fairly large and complex. Small scripting tasks just don’t need the advantages modules offer. However, there is a case where modules might make perfect sense: web server cgi scripts often repeat the same tasks.

Perl binding, or vs. ||

Perl has “||” and “or”. While “or” can’t be used in bit operations, either one can be used in logical flow control – but there is an important difference between them.

Text::Autoformat: Smart Text Reformatting with Perl

I’ve been using http://groups-beta.google.com/ for Newsgroup posting for a while now. It’s convenient for me because of my nomadic life style where I have different ISP’s and often different machines with varying OSes. Google only needs a browser, and they aren’t overly fussy about that, either.