Jenda's pages

So you got a SPAM that includes my mail or web address in its headers, right? Well before you start shouting at me, please read this.


Perl modules - Internetové knihkupectví

Scripts and programs

Visual Basic and VBScript tools

Work of others

Please keep in mind, those modules and scripts were NOT created by me. You should contact their respective authors if you want to say "thank you" :-)

The modules are instalable by PPM or the standard installation procedure. That is you may install them by downloading the .tar.gz file, extracting the archive into a temporary directory and running:

perl Makefile.PL
make test
make install
Keep in mind that if you use ActivePerl you should either use Microsoft's nmake or change the settings in ...\perl\lib\

Most of the modules may be now installed using PPM. Do this to set up my repository in PPM 2.x:

  c:\> ppm
  PPM interactive shell (...) - type 'help' for available commands.
  PPM> set repository Jenda
  PPM> set save
or this to set it up in PPM 3.x
 c:\> ppm
 PPM - Programmer's Package Manager version 3.0.1.
 ppm> rep add Jenda

These are the other repositories I know of:

 CrazyInsomniac: (for Perl 5.6)
You may get more from the PPM::Repositories module :-)


  PPM> install ModuleName
to install whatever module you like. Keep in mind that the double colon in a module name is changed to a dash! So to install Mail::Sender you write
  PPM> install Mail-Sender
If you get a
  Missing base argument at C:/Perl/site/lib/PPM/ line 174
message you probably have a trailing slash in one of the repository paths. Please remove it.

If you want to know how do you create a PPM distribution, read this. Also available as POD and plain text.

If you want to help me with this document, please modify the POD version, thanks. and version 1.08 (uploaded Mon Mar 27 2000)
This is a little module made for CGI scripting. It decodes the parameters passed to the CGI or an arbitrary URL encoded string. It does nothing more, so it's much smaller and loads more quickly than
Since 0.05 you may specify the parameter separator so you may decode parameters passed as name=value;name2=value2;name3=value3.
Since 1.05 (the big version gap is because of :-) you may join the multiple values for one variable by a specified delimiter.
1.06 is only a fix for some -w warnings. version 1.07 (uploaded Fri Aug 08 2002)
This is a little module made for encoding parameters you want to SEND to a CGI script. It does nothing more, so it's much smaller and loads more quickly than
1.04 fixed the stupid {par => [val1,val2,val3]} bug.
Since 1.05 you may specify the parameter separator and the set of characters that should be left unencoded.
I have renamed the module from Enurl to CGI::Enurl !
1.07 fixed a warning and improved the docs. version 2.8 (uploaded Sun Feb 20 2005)
  This module allows you to read an INI file into a HashOfHashes (with several different case handling behaviours) and write a HoH in the INI file format. version 0.04 (uploaded Thu Dec 5 2002)
  Tied hashes with support for defaults (if the key is not found in this hash look it up in that one) and several case handling behaviours. version 0.05 (uploaded Sat Feb 9 2002)
  This module provides "lazy" scalars, arrays and hashes. The "lazy" means that the scalars are evaluated as soon as, but not sooner than used. Then the value is stored for later reference and used in later requests.
See the docs for examples. version : 0.70 (uploaded Thu Aug 21 2003)
   This module was originally created by Mark-Jason Dominus.
You may specify a "type" for the interpolator. The module will then do for you all the necessary magic so that you can use the interpolator as "$foo{par1}{par2a,par3a}" or some such.
See the docs. version : 0.8.13 (uploaded Sat 25 Feb 2006)
   An object oriented interface to sending SMTP mails through a socket connection. Supports multipart messages. Works on Unix as well as under Windows (tested Solaris and WindowsNT 4.0). Doesn't depend on any additional programs, just two more perl modules from CPAN : MIME::Base64 and MIME::QuotedPrint

There is an english tutorial by J. Lambert at his site and a german one at infos24.

Version 0.8.13
fixed handling of apostrophes in email addresses
Version 0.8.10
various fixes
Version 0.8.08
debuging levels
fix in SendEx() for qmail
improved quoted-printable necoding handling (the Outlook problem with =)
addins for better ctype guesswork
ability to ignore rejected recipients if you send to multiple addresses at once
Version 0.8.06
new Mail::Sender ({..., on_errors => 'die'})
new Mail::Sender ({..., on_errors => 'undef'})
new Mail::Sender ({..., on_errors => 'code'})
A small fix for an issue with nested parts on the courier-imap server (whatever it is).
Version 0.8.05
new Mail::Sender ({..., die_on_errors => 1})
Version 0.8.03
NTLM authentication. Keeping connection open for several messages.
Version 0.8.00
Nested parts are now possible. You may create message with plain text and HTML alternatives and attach images to them now.
Tiny end-of-line character related fix. qmail should be happy again. Thanks Mike Warwick.
Version 0.7.14
Authentication support. Several various fixes.
A small but important bugfix. Please don't use 0.7.12 nor 0.7.13. Don't tell me I'm stupid, I know it.
Version 0.7.13
Again compatible with Perl 5.004 (I hope). A few more fixes.
Version 0.7.12
Added debuging. Module accepts multiline responses (qmail problem solved:).
Version 0.7.08 - 10
Version 0.7.07
Bugfix. Fixed a stupid bug related to multipart messages.
Version 0.7.06
Bugfix. Fixed a stupid bug in SendEx() and SendLineEx().
Version 0.7.05
Added fake_from, fake_to and fake_cc options to new/Open/OpenMultipart/MailMsg/MailFile. This allows you to send a message to a list of people, while including only the list name/address in the headers. The fake_... may be whatever text you like, doesn't need to look like an address.
Version 0.7.04
Unimportant fix for PPM installation. No change in the module itself.
Version 0.7.03
bugfix. If you are using version 0.7.xx of the module under Unix you should upgrade immediately !
Version 0.7.02
Added support for different content types or encoding in single part messages, support for multipart/related (HTML mails with inline messages). The module now uses a config file where you may specify the defaults for all new objects and even define a "hook", that is a function that is called for each mail just before contacting the server. Etc. etc. etc. :-)
Version 0.6.6
Added support for CC: and BCC:
Version 0.6
fixed problems with Base64 encoding. Files are now read, encoded and sent in parts instead of whole at once. You may call SendEnc several times in one part now.
Version 0.5
Version 0.4
I added several methods for most common tasks. version 0.2.1 (uploaded Mon Jul 26 1999)
   This module provides a simple interface to CGI Authentication header generation and access permissions testing. The main, but not the only purpose is to overcome the authentication bug in MS IIS/3.0.

The archive contains two directories. The contents of lib directory should be copied to you perl lib directory (say c:\perl\lib). The contents of the docs directory may be copied anywhere you like, it's just the documentation.

The module was originally named only Authent, but to comply with CPAN rules I renamed it to CGI::Authent. There are not differences between Authent 0.2.1 and CGI::Authent 0.2.1. It should be very easy to modify your scripts to accommodate this change. Sorry.


Win32::Registry2 version 0.00.28 (uploaded Mon Sep 17 2007)

Version 0.00.11 was converted from a module Win32::Registry2 into a patch over Win32::Registry, it is believed to be fully "backward" compatible, but it extends the methods of Win32::Registry a bit further :-)
0.00.12-0.00.15 are only bugfixes.
0.00.16 extends FindKey and FindValue methods.
0.00.17 contains a version for Win32::Registry 0.5
0.00.20 contains a version for Win32::Registry 0.6. It fixes a few problems and allows you to call most methods as functions with a "registry path" as the first argument. I'm sorry, but the module now uses module IO::Scalar. I'll try to remove the dependency later. For the time being install IO-stringy either by PPM or from
0.00.21 is just a bugfix.
0.00.22 contains only a fix of the installer and some additions to docs.
0.00.23 removes dependency on IO::Scalar !!!
0.00.24 is just a bugfix.
0.00.25 is a bugfix. If you use this module on Win9x you SHOULD update !!!
0.00.26 adds version for Win32::Registry 0.061 (ActivePerl 522) and fixes one warning.
0.00.27 adds version for Win32::Registry 0.07 (ActivePerl 5.6 builds 6xx).
0.00.28 is bugfix.
You may use it with both AS and GS ports, but if you use the GS or core port, you have to install libwin32-0.15! It was tested with AS 316, GS 5.004_02 + libwin32-0.10 - libwin32-0.15 and ActivePerl 502, 507 and 509 and various ActivePerls 6xx and 8xx.

Please read the docs.

I would like to hear about any problems, pleas and suggestions at version 0.02 (uploaded Mon Jan 11 1999)
  The file should go to c:\perl\lib\Win32 directory.
This module provides quite simple access to the file types and associations. It uses Win32::Registry2 patch so you have to install that one too.

Win32::AbsPath version 1.0 (uploaded Sun Jan 17 1999)
  This tiny module converts relative paths in any form possible in Win32 systems to a canonical, full path. You should use this module to fix the paths before you pass them to external programs or functions called through Win32::API.

Win32::FileOp version 0.14.1 (uploaded Sat Jul 19 2003)
   Module for file operations with fancy dialog boxes, for moving files to recycle bin, reading and updating INI files and file operations in general.
BrowseForFolder dialog, Compressing files, Recent documents, subst.
The file should go to c:\perl\lib\Win32 or c:\perl\lib\site\Win32 directory. It works with both AS and GS ports of Perl 5.005 as well as ActivePerl 5.6. You will need to install Win32::API, Data::Lazy and Win32::AbsPath to use this module!

Win32::Daemon::Simple version 0.2.6 (uploaded Sun Mar 14 2004)
   Leave the service related stuff to the module and focus on the service's task!

Please install the Win32::Registry2 patch if you want to use this module! The patch was supposed to become the official version of Win32::Registry in some upcoming release of libwin32 but it somehow never happened. version 0.6 (uploaded Mon Jan 11 1999)
   This module provides a "perl command prompt" facility for your program. You may do some processing and then simply call PSH::prompt to allow the user to finish the task if something went wrong by calling the functions of your program. See the docs for other examples.
You may of course use the module as a shell.

You will probably want to change the PSH.config file. Take this one as an example. Please keep in mind that this file (if exists) MUST "return a true value" as any other module. The easiest is to end it with "1;" statement. version 0.3 (uploaded Fri Jan 15 1999)
   This is a plug-in into It enables you to easily control Programmer's File Editor from the Perl shell. You may do things like:
psh$ use PSH::PFE;
psh$ ^MO Win32::Registry    Look up Win32::Registry in @INC and open it
psh$ ^BM foo                Set a bookmark named "foo"
psh$ ^GO +10                Go ten lines down
psh$ ^GO foo                Go to bookmark "foo"
This is highly experimental and is intended especially as an example

Requires Win32::Editor::PFE. version 0.2 (uploaded Mon Jan 11 1999)
   Module for controlling Programmer's File Editor through a DDE link.

You can see a few examples of the module use at version 4.1.2 (uploaded Wed Feb 18 2003)
   This module was made for use on Windoze systems, where the shell doesn't do parameter globing. Once you add -MG to PERL5OPT variable you do not have to care about it ;-)

It even understands singlequotes and backticks so you can use the same tricks you could if you were using a Unix shell even from cmd.exe. Well ... almost.

Please install the 4.1.1 if you use PerlApp, PerlSvc or perl2exe. There was a bug in the 4.1 that caused the compiled scripts to lose the first parameter.

4.1.2 fixes a bug causing incorrect handling of perl "-e" "code" params. version 0.2 (uploaded Wed Oct 16 2002)
   This module allows you to filter HTML and remove all except the allowed tags. You just give it a list of tags and attributes you want to allow. version 2.01 (uploaded Fri Nov 05 2004)
   This module parses a DTD file and creates a data structure containing info about all tags, their allowed parameters, children, parents, optionality etc. etc. etc. version 1.06 (uploaded Tue Mar 24 2009)
   This is yet another XML parser built on top of XML::Parser::Expat. You specify the rules by which to transform the XML into a customized, easy to use datastructure and/or handle the branches in the XML structure as soon as they are fully parsed. Please have a look at the docs and the discussion at PerlMonks. Since version 0.09 may be used also as a filter ... that is to modify the XML, the original intent was just extracting data. version 0.04 (uploaded Sun Feb 9 2003)
   This module was written some time in 98. It allows you to create templates in MSWord or any editor you like, include perl code, save it in RTF format and later process the template WHEREVER you like. The module works even on Unix, it doesn't need Word or anything installed.
   The module is still a mess inside, but it seems to work again.
   The docs are included.

Here are some examples:
  Template.rtf - the source
  Template.rtf_?a=5&b=10&c=15 - the result. (unavailable. Did not have time to install on the web server yet.)
  Telefony-List.rtf - the source of the phone list
  Telefony-Groups.rtf - the source of the phone list per group version 0.01.006 (uploaded Fri Jun 5 2009)
   This module allows you to specify the SQL statements or stored procedures, the way you want to return the results and the parameters and defaults and have the whole database access object generated with the prepare()s, binds, etc.

Work of others version 0.14 (uploaded Wed Jun 6 2001)
   This module was made by "Ron L. Wantock" <>.
It was created to allow you to print to several places at once. Eg. to the screen and to a log file.
Save the into subdirectory "Local" in some of your library directories. (dated)
   This is a module made by Aldo Calpini. It's home is now at SourceForge. I've only prepared some PPM distribution(s) some time ago. Please go to SourceForge for information and distributions. You may also install the module from Aldo's repository at !! I'm not the author of the module and to say the truth I'm not even a seasoned user. Please don't ask me how to use it or anything. !!!

See also The GUI Loft ... a WYSIWYG design tool (written in Perl) for designing Perl Win32::GUI Windows.

There were several discussions about the console problem with GUI based perl scripts. Please read here about the solution(s). (Also available in POD and plain text.) 1.0

This script is an example of power of Win32::GUI. It lets you select a DNS, a table and then shows the data in a grid. It was written by Eric Hansen.

   This module was made by Jens Helberg ( I only provided webspace for it for some time. You may find it at CPAN.

The module contains the most important calls of the Lanmanager-API by MS. Additionally, some interesting calls are included for policy management, services, event log etc.

You can group them in the following categories:

All together, it contains all the features provided by the Server-Manager, User-Manager, Dfs-Manager, Event-Viewer and a few more.

You may install it by PPM from my repository.

   This module was made by Amine Moulay Ramdane (if anyone knows his current address please let me know)
Allows you to share memory between processes and to map files into memory.


   This module was made by "Grant Hopwood" <>
Allows interprocess communication with shared memory through the use of tied hashes. Requires Win32::MemMap. &

   This module was made by "Grant Hopwood" <>
Allows the developer to perform the following basic functions with PGP for   Windows:
  Encrypting & decrypting strings and files
  Creating & verifying digital signatures
  Examining the properties of keys and signatures

Works with PGP for Windows 5.5 through to 6.5.8 available at

Scripts and programs

This script allows you to include the options for the PerlApp/PerlCtrl/PerlSvc generated EXE/DLL in an INI-file-like POD section in the source file like this:
=begin PDKcompile



CompanyName=Jenda Krynicky --
FileDescription=PDKCompile - Perl Development Kit (PDK) Compiler Frontend
ProductName=$name $ver
LegalCopyright=Copyright (c) 2002 Jenda Krynicky <>. All rights reserved.
PDKCompile, the Perl Development Kit (PDK) Compiler Frontend, is a wrapper application
for ActiveState's ( Perl compilers.
PDKCompile manages all PerlApp/PerlSvc/PerlCtrl compile tasks using instructions
embedded in source files in a POD section.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Jouke Visser modified the script for use with PAR. You can find his on his Perl page. To allow sharing the options between those two scripts PDKcompile now reads options also from
 =begin compile
section. The options specified in the PDKcompile section overwrite the ones specified in the compile one.

This is a Win32 console application for extracting info from HTML sources. Here is the documentation. This is my old school project I've found during the spring cleansing :-)

I'll make available the sources if I find them. I used to use it on Unix as well.

If you happen to use SciTE you might find this program handy. If you add
# 1. parameter is the tag name(s), 2. parameter is the condition(s)$(file.patterns.html)=Find in HTML
command.2.$(file.patterns.html)=*cmd /c type $(FileNameExt) | htmlelem -i+ -tag $(1) -if $(2) -out "Found at $(FileNameExt) line $_line$\n\t$_tag$\n"
to the a new command "Find in HTML" will appear in the Tools menu. You will be able to search through HTML documents without having to care about the order of arguments in tags and so on.

Do you want to find all links to other servers?
1.parameter = A
2.parameter = HREF=^http://
Do you want to find all GIF images without alt texts?
1.parameter = IMG
2.parameter = SRC=\.gif$ -and ! ALT
Thanks a bunch Neil :-)

The regexps are only basic, no backreferences, character groups or other fancy stuff. And they are most probably not very efficient. As I said, this is a very old school project/homework.

This ISAPI filter allows you to pass the session id at the beginning of the URL. See the for description. version 1.3 (uploaded Tue May 29 2001)

This script is being used to "register" applications or scripts in Win32 systems. After you "register" the application you will not have to enter the full path to it even if it's not in the $ENV{PATH}. The sad thing is that the registrations are used only in the Run dialog or if you use start whatever. It doesn't work on command line directly :-( But it generates a doskey macro if you like that.
You can download my doskey.mac as an example. Here is a "documentation" for it.
If you do not have Perl installed with all necessary modules you may download the "compiled" version. version 1.2 (uploaded Sun Sep 14 2003)

This script monitors the directories you specify and makes a backup copy of every modified file each time you save it. So you may then return to any version you saved. You'll find it in _b_a_c_k_u_p subdirectory of the monitored directory and it will be named filename.ext.YYYYMMDD-HHMMSS.
If you do not have Perl installed with all necessary modules you may download the "compiled" version. 1.0

This script will walk through a directory tree and check the size of paper set in Word documents. If it finds "US Letter" it changes the settings to "A4" and saves the document. Otherwise it leaves the document alone. It ignores files that are already opened. 1.0

This script checks the specified list of services on specified servers and restarts those that crashed.

It's meant to be used as a service but may be used from command line as well of course. 3.3

This script searches the current directory and subdirectories for lines containing the specified pattern or mathing the regular expression. It allows you to filter the files searched by a list of file specifications or a regexp. It was written as a custom Grep-like program for SciTE's "Find in Files" feature.
Since version 2.0 it supports even "Search&Replace".
Since version 3.0 supports "Skip file" and "Exit" commands in the "Search&Replace" and variables and escape sequences in the replacement string, etc.
Since version 3.3 supports "All in file" and "All everywhere" commands in the "Search&Replace".

Visual Basic and VBScript tools

SP_COM_generator version 2.20.6 (uploaded Sat Feb 25 2006)

REMOVED FROM SITE. If you're interested contact me by email and I'll make it available to you. I've asked everybody to send me their comments and suggestions and did not hear a single word.

This program generates a COM wrapper for MS SQL stored procedures. It connects to a database, loads info about user defined types and stored procedures and generates a VB source code (*.cls) for an ActiveX DLL. You specify the database, connection string, options for procedure wrappers, etc. etc. in an INI file and then every time you make a new stored procedure or modify the parameters of an old one the only thing you have to do is to run the program.

To prevent a misunderstanding ... the generated object is NOT supposed to be used from Perl! This program was written to simplify the life of ASP programmers and is supposed to be used from VBScript or JScript!
This was written so that you don't have to create ADO objects and fill in the parameters on all the pages (which are messy enough already), but instead simply instantiate the generated object and call one of its many methods.

Jenda.Rex version 0.14.05 (uploaded Mon Feb 26 2007)

The Microsoft VBScript Regular Expressions (5.5) object is funny at best. It is hard to use, leads to lengthy code and really looks like something a VB "programmer" made.

I was so frustrated by the object that I sat down and wrote my own.

It is written in Perl so it provides full Perl regular expressions. It even allows you to access arrays, collections, recordsets and other similar objects from the replacement string. It doesn't need Perl installed on your machine though so no need to worry dear VB kiddies!

Version 0.7 provides several additional functions: HTMLescape(), TAGescape(), FUZZYescape() and HTMLfilter().

Version 0.8 the HTMLfilter() is quicker and safer. FUZZYescape and HTMLfilter understand XHTML tags.

Version 0.8.1 minor fix in the HTMLfilter(). (If you fiter out <SCRIPT> or <STYLE> it strips the body as well.)

Version 0.8.2 StripHTML also honors the AllowXHTML switch.

P.S.: Please do NOT ask me why am I using VB at all!

Recommended reading & other links

These articles are not written by me! I just think they are well worth reading. The credit goes to their respective authors.

My own articles

You know, sometimes you feel like talking...