-
How-to: Perl Hashes and Hashes of Hashes
Introduction to Perl Hashes In this tutorial, we will cover Perl Hashes and Hashes of Hashes. Perl Hashes are a great way to store key => value pairs. Perl Hashes are stored in running memory so accessing the data stored in them is very fast. In more advanced cases you can pull data from a database…
-
Perl Ternary Operator
You are probably familiar with writing if / else statements with perl. In this tutorial we will cover some ways you can use the Perl Ternary Operator to shorten your if / else statements into a single line of code. Saving you a bunch of keystrokes and making your code more efficient. The Perl Turnary…
-
Anonymous Perl Hashes
If your passing variables to a subroutine in perl, using Perl Hashes and Anonymous Perl Hashes to send a list of configuration options is a handy way to save a few lines of code. Anonymous hashes are hashes just like any other but you can declare them anywhere. They can come in handy when you…
-
File System Monitoring Perl Script
I had a need for a Filesystem Monitoring Perl Script. I have a filesystem that is mounted on a SAN and I suspect that the SAN is becomming unreachable momentarily every once in a while. It can cause issues with an application I support on the system, that relies heavily on this filesystem being available…
-
Redirect Subdomain to Root Domain in Apache
One key aspect of setting up a website that is search engine friendly is redirecting your subdomain (www.example.com) to your root domain (example.com) or vise versa. The reason you must do this, is because search engines see each domain as a separate site. If two sites have duplicate content you could be penalized in the…
-
How-to: Find The Size of All Tables In An Oracle Database
I came across the need to total up the size of all tables in an Oracle database. The server housing the current database was End of Life and we needed to spec out the size of its replacement. I did not have DBA level access to the database but I did have the database user…