in reply to Re^2: Script won't run
in thread Script wont run

I meant to say earlier, if your input is XML — as indicated by the file extension and filehandle name in your OP — then you’ll be better off reading it with a dedicated module, such as XML::LibXML or XML::Twig.

However, the file excerpt you show here is not valid XML.

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,