My "Perls"
Home
My Pictures
My Car
My Dream Car
My "Perls"
Prime Numbers
I've benefited greatly from programming code that people are willing to share on the web, so I'll share a couple of my "perls".

Note: All of my perl programs are developed and run on a WINTEL machine, with an ActiveState Perl installation, so there are some windows specific things in my perl programs.

This very simple perl script makes an html page out of a file of (perl) code. All it does is add html header and footer, and then change the "&", "<", and ">" characters into "&amp;", "&lt;", and "&gt;" to cooperate with the HTML rendering engine. I used it to make pages to show all my perl code examples.

This is the perl script I use to make the html graph of my car's mileage. I recently reworked this code to spread the the graph onto multiple lines. Modifying old code is a chore for an amature like me.

This perl script takes the name of a file on the command line, opens and reads that file, removes leading spaces, adds characters to the front of the line according to curly braces, { }, that visually make it easy to pair them up. It ignores C and C++ style comments.

This perl script takes the name of two a files on the command line, opens and reads them. It assumes that the files are (very) similar VHDL code and compares them. It ignores capitalization, spaces, and VHDL comments. It outputs lines from the files with "significant" differences.

This perl script makes an analog clock in your console command (DOS) window. It defaults to a smallish size, but you can give it command line parameters to change its size and shape. I like 40, 1.5 on my big screen.

This perl script does the algorithm described on my Prime Numbers page. I call it the Sieve of Oregon because I lived in Oregon when the idea came to me. Two command line arguments, num_primes_to_use and extra_extend, determine how far the algorithm goes. This will generate all the prime numbers up to the product of the first num_primes_to_use primes times extra_extend. For example, if num_primes_to_use = 6 and extra_extend = 3, the first 6 primes are 2 3 5 7 11 13, so this will generate all the primes less than 2x3x5x7x11x13x3 = 90090. If extra_extend is greater than the num_primes_to_use'th prime, this algorithm may erroneously produce some composite numbers.

And of course, if you're an HTML novice like me, and see anything on these pages that makes you wonder "How did he do that?", with your browser do <View>, <Source>. For now, I'm trying to consistently indent my HTML code to make it easier to see the structure.

Back Home