SGML::DTD

Steve Rushe steve-pmbelfast at blackstar.co.uk
Tue Nov 20 04:26:39 CST 2001


On Mon, Nov 19, 2001 at 11:51:46PM +0000, Andrew McFarland wrote:
>
> However, it gives the warnings:
>
> SGML::EntMan:Unable to open "-//W3C//ENTITIES Latin1//EN//HTML" => ""
> SGML::EntMan:Unable to open "-//W3C//ENTITIES Symbols//EN//HTML" => ""
> SGML::EntMan:Unable to open "-//W3C//ENTITIES Special//EN//HTML" => ""
>
> Are these serious problems, and how do I fix them?
Don't know... The docs do say there may be trouble using the default
rules of SGML::EntMan when calling SGML::DTD. So I'd guess that you need
to construct your own EntMan object and pass that to the DTD object.

> The second problem is rather more serious.
>
> What should I do to fix this? I've tried various combinations of
> things,
> and I either get ARRAY(0x8286e40) or an empty string. It's too late to
> do
> any more at the moment :)

Well the ARRAY(0x8286e40) thing means that it's an array reference.
Dereference is and bob's your uncle. So when you foreach over
$attributes{$_} check to see if $_ is an array ref, the 'ref' call is
your friend. If it is then deference it and iterate over it.

At this point it is traditional to mention 'use strict' and warnings.
You use them in the first, but not the second script; what's that all
about then Ted?

Also better to check when you open the file if it has succeeded.

There ends the sermon :)

Steve


-- 
Steve Rushe - www.deeden.co.uk

Space is cold, home is colder when you come home at night 
and there's nobody here.               - The All Seeing I



More information about the Belfast-pm mailing list