Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: R or B?

by Corion (Patriarch)
on Dec 01, 2021 at 16:13 UTC ( [id://11139296]=note: print w/replies, xml ) Need Help??


in reply to Re: R or B?
in thread R or B?

As the one suggesting Mo-Do as another datapoint, I feel obliged to add something productive, so here's the (deparsed) oneliner I used to look at the statistics of lyrics:

# BEGIN { $/ = "\n"; $\ = "\n"; } # use feature 'current_sub', 'evalbytes', 'fc', 'postderef_qq', 'say', + 'state', 'switch', 'unicode_strings', 'unicode_eval'; while (<>) { chomp $_; foreach $_ (/(\w+)/gu) { ++$total; ++$count{lc $_}; } END { say "${_}: $count{$_}" foreach (sort keys %count); say sprintf('%d distinct words in %d total', scalar keys %coun +t, $total); say sprintf('%0.2f', scalar keys(%count) / $total); } }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11139296]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-03-28 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found