Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^7: Why should any one use/learn Perl 6?

by liz (Monsignor)
on Jun 12, 2018 at 21:54 UTC ( [id://1216507]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    constant RANGE = 10_000;
    my %hash = ^RANGE Z=> 0 xx RANGE;
    ...
    # Seen 10000 keys
    say "Average value (~100 if threadsafe): { %hash.values.sum / %hash.el
    +ems }";
    # Average value (~100 if threadsafe): 91.7143
    
  2. or download this
    constant RANGE = 10_000;
    my %hash is Bag = await do for 1..10 {
    ...
    # Seen 10000 keys
    say "Average value (~100 if threadsafe): { %hash.values.sum / %hash.el
    +ems }";
    # Average value (~100 if threadsafe): 100
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-19 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found