#Coding
-
UTC/Local Date Conversion in Perl With Time::Piece
Time::Piece is my preferred perl module for handling dates. Here is how it can be used to convert between UTC and the local time, even for past dates which may have crossed the current daylight...
read article -
Regex is a Programming Superpower!
In an August 15 tweet, @iamdevloper, a very funny programmer-humor account, asked which technology you wouldn’t bother to learn over again: JavaScript, Regex, Kubernetes, or PHP. Never mind the...
read article -
Using ack to search Apache web logs
The ack utility uses Perl regular expressions to efficiently search source code, with smart defaults to limit the results to what you expect. One of the ways I use it is to search our Apache web log...
read article -
Automatically Updating CVS Revisions Remotely
Our install process involves updating the CVS versions of individual files on the staging and ultimately production servers. Web Operations is responsible for manually updating the files listed on an...
read article -
Calculating Distances in Microsoft SQL Server
One feature of almost every modern commercial website is the location finder. Enter in a search address, and site displays the closest locations to it with the distances (as the crow flies). I ran...
read article -
Installing ODBC on Linux for MSSQL and AS400 DB2
At work, we use Microsoft SQL Server and IBM AS400 databases. Here’s how I set our Linux boxes to allow them to connect to the databases through ODBC. There are seperate instructions for the Debian...
read article -
Returing null Columns from iSeries AS400 with Perl DBI
We’re having an issue with database queries to the iSeries AS400 through Perl using DBI and DBD::ODBC. The issue occurs when the SQL statement contains an outer join and the query returns rows with...
read article -
Using jQuery Tablesorter With Dynamic Tables
Here are a couple of tricks to remember when using jQuery’s tablesorter plugin with dynamic tables. These are tables that the user can add or delete from. If the table begins empty (with no rows in...
read article -
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. Time::Piece – CPAN module...
read article -
CVS update error: 'No such file or directoryectory'
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:...
read article -
Calling a Perl CGI script from within another CGI script
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,...
read article -
Java Terminator: Cross-Platform Terminal Emulator
For years, I’ve been searching for a suitable terminal emulator for Cygwin, but nothing seemed as polished or had enough features to pull me away from the boring default. I finally found the Holy...
read article -
Using LWP::Simple to retrieve binary data
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...
read article -
Things I always need to look up in Perl
Here are some random Perl things I always need to look up: Print the string representation in hex print join( ’ ', map { unpack “H*”, $_ } split( //, $x ) ); Text replacement on a per-file basis perl...
read article -
Writing an Apache Module for RHEL 5
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...
read article -
Perl Modules Primer
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. Creating the...
read article