in reply to Re: Seaching for text in string and comparing to xml, if not found print text
in thread Seaching for text in string and comparing to xml, if not found print text

Argh, no! Don't do this! There's no need to re-read the whole XML file for every line of the text file (unless you expect the XML file to be constantly changing). Read it into a hash once at the start of the script.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
  • Comment on Re^2: Seaching for text in string and comparing to xml, if not found print text