rardoe has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use warnings; my $linexml; my $cleanedXML; my $cleanedDomain; open (XML, 'domainList.xml'); while (my $xmlline = <XML>) { $linexml = $xmlline; $cleanedXML = quotemeta $xmlline; open (DOMAINS, 'dead_domains.txt'); while (my $domainline = <DOMAINS>) { $cleanedDomain = quotemeta $domainline; if ($cleanedXML =~ m/$cleanedDomain/) { $linexml = ''; last;} } close (DOMAINS); open (MYFILE, '>>new_domainList.xml'); print MYFILE "$linexml"; close (MYFILE); } close (XML);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RegEx Matching, Loop Breaking...
by toolic (Bishop) on May 28, 2013 at 17:30 UTC | |
by rardoe (Initiate) on May 28, 2013 at 17:49 UTC | |
|
Re: RegEx Matching, Loop Breaking...
by hdb (Monsignor) on May 28, 2013 at 18:56 UTC | |
by rardoe (Initiate) on May 28, 2013 at 19:45 UTC | |
by AnomalousMonk (Archbishop) on May 28, 2013 at 20:05 UTC | |
|
Re: RegEx Matching, Loop Breaking...
by Laurent_R (Canon) on May 28, 2013 at 17:50 UTC |