#!/usr/bin/perl

eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
    if 0; # not running under some shell

use HTML::HTML5::Parser;

my $uri = shift @ARGV
	or die "Please specify an input URL or filename.\n";

my $parser = HTML::HTML5::Parser->new;
my $dom    = $parser->parse_file($uri);

print $dom->toString;