Category: Perl

  • Perl DBI Connect, Select, and Insert.

    Perl DBI Connect, Select, and Insert.

    In a previous tutorial we covered connecting to an oracle database using Perl DBI and XML::Simple. This tutorial builds on that lesson and covers how you can perform Select and Insert Queries against the Oracle Database. To recap we are connecting to our database using the DBI module and perl. In our lab setup, the…

  • How-to: Perl Arrays

    How-to: Perl Arrays

    In this tutorial we will cover Perl Arrays. Perl Arrays are a good way to keep a list of elements handy in memory for further reference later in your program. If you want to have a list, Perl Arrays are a good way to do this. Perl Arrays are more intensive on resources than hashes…

  • 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…