Jump to content

Inverted index: Difference between revisions

m
→‎{{header|Perl 6}}: handle case of search word not found
No edit summary
m (→‎{{header|Perl 6}}: handle case of search word not found)
Line 2,027:
foreach search_words_with_index({createindex(@ARGV)}, @searchwords);</lang>
=={{header|Perl 6}}==
{{works with|rakudo|2015-09-16}}
<lang perl6>sub MAIN (*@files) {
(my %norm).push: do for @files -> $file {
Line 2,035 ⟶ 2,036:
while prompt("Search terms: ").words -> @words {
for @words -> $word {
say "$word => {%inv.{$word.lc}//'(not found)'}";
}
}
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.