Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Hash Math

by tobyink (Abbot)
on Mar 11, 2013 at 14:41 UTC ( #1022805=note: print w/replies, xml ) Need Help??

in reply to Hash Math

Something like this?

use 5.010; use strict; use warnings; use List::Util 'sum'; my %messages; $messages{one} = { from => "Alice", to => "Bob", size => 1000, }; $messages{two} = { from => "Bob", to => "Carol", size => 200, }; $messages{three} = { from => "Carol", to => "Dave", size => 30, }; $messages{four} = { from => "Dave", to => "Eve", size => 4, }; say sum map $_->{size}, values %messages;
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1022805]
[karlgoethebier]: Ouch! How can i link to a section in my profile?
[erix]: I suppose you have to add anchors yourself
[karlgoethebier]: erix: OK Trial and Error. Thanks
[LanX]: <a name='anchor'> ?
[erix]: I'd just try <a id="header text on page"></a>
[LanX]: yep

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2017-06-24 13:22 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (557 votes). Check out past polls.