Perl

Perl

Sort IP Addresses Using Perl

Sort IP Addresses Using Perl

When dealing with lists of IP addresses, it was common for the numbers to merge together and lose track of duplicates, bad IP addresses etc. This Perl script helps you extract valid IPs from a block of text.

Watermelon Chess SVG Using Perl

Watermelon Chess SVG Using Perl

Watermelon chess is a simple strategy game where you surround your opponent to remove them from the game. We are creating game boards for the CNC router. The first step is to create a SVG file. From the SVG file, we then create the g-code. This article contains rules about ...

Extract URI Using Perl Regexp::Common

Extract URI Using Perl Regexp::Common

I wanted to see the urls to several things and didn’t want any other text cluttering my notes. Perl to the rescue, specifically Regexp::Common. There are several ways to get a URI, and Regexp::Common will get 99% of the URIs. It works for what I needed, and took 10 seconds to implement – ...

Perl List Files in Directory

Perl List Files in Directory

If you want to list all of the files in a directory, you can use glob. The following Perl code will put all “mp3” files in an array called @mp3s. The sample loop shows how to loop over that loop. Shell my @mp3s = glob "./*.mp3"; foreach my $in (@mp3s) { print $in . "\n"; } 1234 my @mp3s ...

SVG Perl Script to Make Alquerque Game Boards

SVG Perl Script to Make Alquerque Game Boards

Alquerque boards are used for a variety of games. Fanorama, Tigers vs Goats (Bagh bandi), Fox and Geese and other variants similar games are some of the examples. Here is how to make Alquerque game boards in SVG using Perl. Games that use Alquerque boards: Fox & Geese Several variants of this such ...

SVG Perl Script to Make 6 Point Star

SVG Perl Script to Make 6 Point Star

Solomon’s game is similar to checkers but uses the star of Solomon. It’s a modern game invented by . Here is the Perl code to generate an SVG file game board. What is the Star of David? First, there are 2 stars mentioned as false idols in the Bible (Acts 7:43 and Amos: 5:25–27). ...

Create Graph Paper or Checkerboard in Perl

Create Graph Paper or Checkerboard in Perl

In the quest to find activities to do with our kids, we decided to make some games. Instead of drawing the boards by hand (and because the CNC router wanted SVG files), we made a program to make the boards. Here is the Graph Paper or Checker Board of any size ...

Pretwa Game Board Using Perl to Create SVG

Pretwa Game Board Using Perl to Create SVG

Pretwa is similar to checkers in that you jump and capture pieces. That is where the similarity ends. This article shows how I created a Pretwa board in SVG using Perl, and explains the rules of the game. What is Pretwa? Pretwa is a game from the state of Bihar, India for two ...

SVG Perl Script to Make 9 Men's Morris Game

SVG Perl Script to Make 9 Men’s Morris Game

9 Men’s Morris is a great simple strategy game that has been around for thousands of years. You can play it by scratching some lines in the dirt (or paper) and then using 9 tokens each. Here is a Perl script that generates a game board for you in SVG format. 9 ...

Compare List of IP Addresses With Perl and Tk

Compare List of IP Addresses With Perl and Tk

If you happen to have a list of IPs and you want to compare to another list IPs, you can use Perl and Tk to automate the process. When preparing networking reports it is common to have a list of IP addresses and you might need to compare to another list as you research. ...