my @patterns = (
"
##
my @regexps = (
qr{(.*?) }, # ID
qr{(.*?) }, # Time Stamp
qr{(.*?) }, # IP Address
qr{(.*?) }, # Title
qr{(.*?) }, # Reporting Entity
qr{(.*?) }, # Reporting Entity Contact
qr{(.*?)}, # Reporting Entity Address
qr{(.*?) }, # Reporting Entity Email
);
my @xml_files = <*xml>;
for my $file (@xml_files) {
for my $regexp (@regexps) {
...
if ($line =~ $regexp) {
...
}
}