|
|
| "be consistent" | |
| PerlMonks |
Re: Seaching for text in string and comparing to xml, if not found print textby tobyink (Monsignor) |
| on Feb 14, 2013 at 08:16 UTC ( #1018699=note: print w/ replies, xml ) | Need Help?? |
|
My general technique would be to start by extracting a list of all ALARM_ID strings from the XML file. Because of the size, assuming the XML is fairly predictable, it might be best to do this with a simple regular expression. Then use map to convert that list to a hash where the ALARM_ID strings are the keys and the values are all "1". Then loop through the text file, line by line. Extract the alarm ID from the line; if it's in the hash described in the previous paragraph, then print "Success\n" as output; otherwise, print the line as output.
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||