#!/usr/bin/perl -w use strict; use XML::LibXML; my $file = shift; my $xmlparser; my $doc; $xmlparser = XML::LibXML::new(); $doc = $xmlparser->XML::LibXML::parse_html_file( $file ) or die "unable to parse $file: $@";