in reply to Regular Expression XML Searching Help
Without the /s modifier, a dot (.) will not match a newline.use File::Slurp; ... for my $file (@files) { my $content = read_file($file); unless ($content =~ m{<order>(.*)</order>}s) { # bad file } else { # found <order>...</order> } }
|
|---|