The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Text::CHM - Perl extension for handling MS Compiled HtmlHelp Files


  use Text::CHM;
  $chm = Text::CHM->new('foobar.chm');
  print $chm->filename(), "\n";  # It will print "foobar.chm"
  @content = $chm->get_filelist();

# I hope you don't really do this! foreach $file ( @content ) { pring $chm->get_object($file->{path}); }



Text::CHM is a module that implements a (partial) support for handling MS Compiled HtmlHelp Files (chm files for short) via CHMLib. CHMLib is a small library designed for accessing MS ITSS files. The ITSS file format is used for chm files, which have been the predominant medium for software documentation from Microsoft.

Chm is a filesystem based file format, such as MS Excel or MS Word file formats, but they aren't the same.

Text::CHM allows you to open chm files, get their filelist, get the content of each file and close them; at the moment, no write support is available.



Opens the chm file filename and returns the chm object.


Returns the name of the current working chm file.


Returns a list of hash references with the following fields:

path: the path of the file in the chm object;
size: the size of the file;
title: the title of the file, if it is an html one, else undef.


Returns the content of the object found at path in the chm file.


Close the chm file opened with new().


General understanding of perl is required, see perldoc perl for more informations.

CHMLib website is available (at the moment) at the address

For a detailed (unofficial) description of the CHM file format see Pabs' unofficial chm specifications or Matthew T. Russotto's CHM site, respectively at and

Text::CHM's website is


Domenico Delle Side, <>


Copyright (C) 2005 by Domenico Delle Side

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.