Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: hash refrences

by belden (Friar)
on Feb 04, 2011 at 19:40 UTC ( [id://886283]=note: print w/replies, xml ) Need Help??


in reply to hash refrences

Here's another way to approach the problem.
sub compute_bonuses { return +{ map { $_[0]->{$_}{sales} > 30 ? ($_ => sprintf '%.02f', (100*$_[0]->{$_}{salary}/500)) : () } keys %{$_[0]}, }; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (11)
As of 2024-04-19 16:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found