Home

About Us

Books

Free Stuff

Oh, So That's How It Works!

Fellow Magicians

Useful Links



WizardWrx Logo

Free Stuff
P6C Perls

Overview

Welcome to P6C Perls, the P6 Consulting Perl Library. This is a small collection of deceptively simple, yet very powerful Perl scripts that you may freely use and adapt. This is a small sample of the kinds of things that we do with Perl on the Windows platform, to say nothing of what we do with Perl in the CGI space on Red Hat Linux for our Web sites.

New! Check out our newest Perl, P6TrimText.pl, a little program that makes quick work of removing stray white space from text files. Extra blank lines and trailing white space causes programmers all sorts of difficulty, from unexpcted errors on data imports to erratic program behavior, especially from programs that print formatted text. I have wanted to have such a program for a long time, and I was finally motivated to write this one last week. Use this script to banish stray blanks from your text files.

We invite your inquiries about using Perl and many other powerful tools to create programs that help you use computers to solve problems in imaginative ways.

Though the usual practice is to publish Perl scripts as is, with only embedded documentation, we intend these scripts to serve a wider audience. Therefore, we compiled the embedded documentation into a regular HTML page that can be viewed in a standard Web browser. This is easy to do with tools that come with the ActiveState Perl distribution that we use.

The other reason these Perl scripts are wrapped in packages is so that we could include the MS-DOS program P6PAUSE.COM that you can include as the last line in a batch file to prevent a command window from closing until you examine the console output generated by the script. Like the accompanying Perl scripts, P6PAUSE.COM is free but unsupported software.

The Catalog

Script

Version

Posted

Description

Download

MD5 Digest

P6LongLines.pl

1.02

24 February 2005

Scan a delimited export and report malformed records.

P6LongLines.zip

89e15f1870486939bede7cfb7291d244

P6_CheckDE.pl

1.01

18 April 2004

Scan a delimited export and report malformed records.

P6_CheckDE.zip

e5c02b0dd0d4989d0d6f67d42a31ac54

P6_CountLines.pl

1.03

18 April 2004

Count lines in any standard ASCII file.

P6_CountLines.zip

1d84db026711000433b029eb4f8d292e

P6_EnumFormFlds.pl

1.00

18 April 2004

Enumerate fields in all forms in a HTML document and write the details into an XML document.

P6_EnumFormFlds.zip

2f7b318918d9ebdc3aa36b1a72deae31

P6_HTTP_Head.pl

1.10

18 April 2004

Send a HTTP HEAD request to get the summary information for a document. This is also a slick way to learn what kind of server hosts the page.

P6_HTTP_Head.zip

ada44b852749af3b7b5fa59a51479e91

P6_SampleDE.pl

1.02

18 April 2004

Create a sample containing an arbitrary number of records selected by extracting every nth record from a large delimited ASCII file.

P6_SampleDE.zip

17796d8ba14fd3805159c7c231fddf09

P6_SplitDE.pl

1.04

18 April 2004

Split a text file into smaller files containing a specified maximum number of lines apiece.

P6_SplitDE.zip

97fa710dbd192b738c919efa25fae653

P6TrimText.pl

1.01

06 March 2005

Cleanse a text file up to two ways.

  1. Remove all blank lines, or only extra blank lines at the end of the file.
  2. Remove trailing white space from all lines in a file.

Default operation removes only extra blank lines at the end of a file. Command line swithces permit you to completely control the behavior of the script. Like all Perl scripts, it makes short work of even the largest text files.

P6TrimText.zip

626fe900d7719cbb22a1dc3f6212a67f

The Works

1.00

11 August 2006

This archive contains all the scripts and their documentation.

P6C_Perls.zip

5edc5c831404d088bbf55629cfa1318a

Requirements

In order to use this package on a Windows machine, you need three things.

  1. This package.

  2. Perl for Win32, freely available from Active State

  3. A working knowledge of the way Windows finds programs specified by unqualified names.

Though you can get a good bit of benefit from these scripts without knowing anything about Perl, you need a working knowledge of Perl to adapt them to other tasks. If you do so, we expect that the documentation of the code itself will ease your learning curve.

Installation

Installation on a Windows machine requires up to three steps.

  1. If you already have ActivePerl installed, skip to step 3. Otherwise, download ActivePerl from here.
  2. Install Perl for Win32, making certain to allow the setup program to register the .PL extension.
  3. Extract the contents of the package into a directory that is on your PATH.

You are ready to go. Lower your goggles and fasten your seat belt. Perl scripts are lightning fast!

These scripts can also be used on Unix and Linux machines with some modifications, which are beyond the scope of this document. If you know a bit about shell scripts, you should be able to work out these changes on your own.

Author

David A. Gray, of Simple Soft Services, Inc, d/b/a WizardWrx, http://www.wizardwrx.com or use this form.


Copyright

Copyright (c) 2005-2006, David A. Gray, of Simple Soft Services, Inc, d/b/a WizardWrx. All rights reserved world wide.

These programs are free software; you may redistribute and/or modify them under the same terms as Perl tself.


P6C Contact Info

Copyright and Legal Notice