user
Task

Find all    <lang>    tags without a language specified in the text of a page.

Display counts by language section:

```
Description

<lang>Pseudocode</lang>

=={{header|C}}==
<lang C>printf("Hello world!\n");</lang>

=={{header|Perl}}==
<lang>print "Hello world!\n"</lang>

```

should display something like

```
2 bare language tags.

1 in perl
1 in no language

```

Extra credit

Allow multiple files to be read.   Summarize all results by language:

```
5 bare language tags.

2 in c ([[Foo]], [[Bar]])
1 in perl ([[Foo]])
2 in no language ([[Baz]])

```

Extra extra credit

Use the   Media Wiki API   to test actual RC tasks.
assistant
(formerly Perl 6)

**Translation of**: Perl

The only tricky thing here is the use of the ms form of match, short for m:sigspace. This causes whitespace in the regex to be considered "significant", that is, it matches optional whitespace at those positions, as if you'd put \s\* there. Of course, the regexes themselves are in Raku syntax, which is quite different from Perl 5 regex syntax (and arguably much cleaner). Regex syntax is perhaps the area in which Raku diverges most from Perl 5.

```
my $lang = '(no language)';
my $total = 0;
my %blanks;

for lines() {
  when / '<lang>' / {
    %blanks{$lang}++;
    $total++;
  }
  when ms/ '==' '{{' 'header' '|' ( <-[}]>+? ) '}}' '==' / {
    $lang = $0.lc;
  }
}

say "$total bare language tag{ 's' if $total != 1 }\n";
say .value, ' in ', .key for %blanks.sort;

```

Output:

```
2 bare language tags

1 in (no language)
1 in perl
```