Notes from the Perl FAQ
Like the fellow that never read his car’s owner’s manual, I had never read the entire Perl FAQ. I finally did it over the holidays, and these are some notes that I took.
Last Updated: Fri, 20 Jan 2012
Keith A. Carangelo
About
I am a
software engineer
with twenty years experience developing
real-time applications for a number of different industries.
I have worked on medical and military embedded systems
and distributed applications in storage, networking, and monitoring.
I am also a freelance web designer with national clients. I specialize in solving issues with existing sites; giving a professional engineering edge to sites designed by graphic designers or artists.
Email
mail@kcaran.com
Like the fellow that never read his car’s owner’s manual, I had never read the entire Perl FAQ. I finally did it over the holidays, and these are some notes that I took.
Last Updated: Fri, 20 Jan 2012
When I execute a CVS update command at work, I often get the following error:
[caran@mater safetypublic]$ cvs -q update -AdP : No such file or directoryectory /home/cvs/safetypublic/rsvp cvs update: skipping directory rsvp
No such directoryectory? What the heck is that??
Last Updated: Thu, 10 Nov 2011
Awhile back we had an issue where a coworker wanted to use one of my Perl CGI scripts inside of her scripts, using the backticks method to have it spit its output to the webpage. But for some reason, my script refuse to recognize the arguments she was passing it. The weird thing was, if we ran her script from the command line, everything worked fine.
The issue is in the way CGI.pm detects whether it is being called from a web browser or from the command line. It checks for the presence of the REQUEST_METHOD environmental variable. If it is present, CGI knows to get its arguments from the web browser.
Last Updated: Fri, 19 Nov 2010
We have a Perl CGI script at work that acts as a proxy. It grabs a pkcs12 digital certificate file from an internal server and delivers it to a user through his or her web browser. The pkcs12 file is in binary format.
Everything worked fine until put the code on a new server. Suddenly, the
files downloaded by the web users were corrupted. We also began seeing the
following warning in the log files:
Wide character in print at download.cgi line 124.
Here is the code…
Last Updated: Fri, 16 Apr 2010
Here are some random Perl things I always need to look up:
Last Updated: Mon, 21 Dec 2009
Recently, I was asked by my employer to write an Apache module. The module reads the requestor’s digital certificate and checks it against our database of active users. In this post, I’ll explain how to get started writing Apache modules, especially for Red Hat Enterprise Linux 5 (RHEL 5.2).
Last Updated: Wed, 14 Jan 2009
Making your Javascript code work on both IE and Firefox isn’t hard. Here are a few modifications to IE-only code to make it work on Firefox:
Last Updated: Thu, 17 Nov 2005
Managing and tracking changes made to code, otherwise known as version control, is vital to any software project, large or small. CVS, the Concurrent Versions System, is one change management application. This is a summary of how to use CVS in an environment with servers running both Unix and Microsoft Windows operating systems.
Last Updated: Wed, 05 Oct 2005
Splitting a Perl application into seperate files can be trickier than doing it in other languages, like C or C++, but it is still an important part of producing maintainable code.
A Perl module is a collection of code stored in a single file. By definition, all variables and function names in the module are stored in a package with the same name as the file.
For example, a module named Cgiutils would be stored in the file Cgiutils.pm. Any functions or variables in the module belongs to the Cgiutils package namespace. The beginning of the file should look like this:
Last Updated: Mon, 26 Sep 2005
Some may consider me a masochist, but Perl is my language-of-choice for web applications, even when I am “forced” to use Microsoft’s Internet Information Services, otherwise known as IIS, for my web server.
As usual, the Microsoft server has little quirks that need to be tamed in order to write cross-platform code. Here are some tips for making your perfectly good Perl code run under IIS:
Last Updated: Mon, 26 Sep 2005
I’ve been having some trouble with the way Microsoft SQL Server pads strings stored in its tables with spaces. Generally, I would assume that columns of type ‘CHAR’ would be a fixed length (and therefore padded), while columns of type ‘VARCHAR’ would be variable length. But I would be wrong.
The default behavior for SQL Server 7.0 and Server 2000 is that CHAR’s and VARCHAR’s are padded to their maximum lengths. To make the VARCHAR columns unpadded, the ‘ansi_padding’ property needs to be set to ‘off’. Unfortunately, you must do this every time you open a session with the database server. There isn’t a way to force ANSI padding off as the default.
Last Updated: Mon, 26 Sep 2005