Rosetta Code/Count examples: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (Add a link to Full output page) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: Adjust matcher to catch oddball header markup.) |
||
Line 1,681: | Line 1,681: | ||
my $page = |
my $page = |
||
$client.get("{ $url }/index.php?title={ uri-escape .<title> }&action=raw").content; |
$client.get("{ $url }/index.php?title={ uri-escape .<title> }&action=raw").content; |
||
my $count = +$page.comb(/ ^^'==' <-[\n=]>* '{{header|' \w+ \N+ '==' \ |
my $count = +$page.lc.comb(/ ^^'==' <-[\n=]>* '{{header|' \w+ \N+ '==' \h* $$ /); |
||
%tasks{.<title>} = {'cat' => %cat{$cat}, :$count}; |
%tasks{.<title>} = {'cat' => %cat{$cat}, :$count}; |
||
print clear, 1 + $++, ' ', %cat{$cat}, ' ', .<title>; |
print clear, 1 + $++, ' ', %cat{$cat}, ' ', .<title>; |