Perl

Test List of URLs for Fastest Response

This Perl script will take a list of URLs and sort them by the fastest ping response.

Read the full article →

Perl Keyword Density Checker

Not so much now, but keyword density used to be a very large factor in determining how well a website ranks. This perl script counts words and tells you what their percentage is:

Read the full article →

Perl Remove Unwanted HTML

In case you want to remove the extra email such as spans, div, and other junk from a block of text, you can use HTML::Restrict like this:

Read the full article →

Perl MD5sum Using Digest::MD5

There is a binary utility on most flavors of linux that allows you to compare if a file is exactly the same as another. Here is how you get MD5 info using Perl:

Read the full article →

Perl Strip Out hrefs

I was importing text into a shopping cart that was provided by the vendor, but they included links back to all their products! I wanted the keywords, but not the links. HTML::TokeParser::Simple did the job:

Read the full article →

Perl MIME::Base64

Base64 Encoding allows you to convert a binary file into a text message. Sometimes binary is not allowed to be transmitted. Whatever your reason, here is how you create a Base64 encoded file using Perl:

Read the full article →

Extract IPv4 Address From Text Using Perl

I had a list of IP address and wanted to know what they were – but I didn’t want to do a DNS lookup by hand on each. The list I had was really a chunk of text with IPv4 addresses all over in it. Here is how I extracted them for the report:

Read the full article →

Perl Check Open Ports

I needed to check a list of jumphosts and see if they were linux or windows. I didn’t want to log in to each one manually and wanted the results of something like nmap saved into a CSV file. I could of grepped through nmap output, but it wouldn’t of formatted the way I wanted. [...]

Read the full article →

Perl Convert List of Hostnames to IP4 Addresses

Instead of having to type nslookup over and over, let’s script a solution that queries a list. We can then redirect the output into a file and have a nice, CSV output – all automated.

Read the full article →

Perl One Liners

Perl One Liners can help you quickly edit files, strip lines, and perform other common admin tasks. Here is a small collection of my perl one liners that I’ve used recently.

Read the full article →