luckysing has asked for the wisdom of the Perl Monks concerning the following question:
Employees get a 20% bonus on their base salary if their sales exceed 30 units. Your compute_bonuses() function should take a single argument like $emp_data above, and return a hashref with names as keys and bonus amounts as values. The output hashref only contains employees receiving a bonus, e.g. { "jane" => 10.06, ... }$emp_data = { "bob" => { salary => 38.7, # in k$/yr sales => 23, # uni +ts }, "jane" => { salary => 50.3, sales => 36, }, ... };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hash refrences
by toolic (Bishop) on Jan 18, 2011 at 00:58 UTC | |
by tilly (Archbishop) on Jan 18, 2011 at 01:30 UTC | |
by fennec (Initiate) on Feb 04, 2011 at 19:28 UTC | |
by luckysing (Novice) on Jan 18, 2011 at 01:28 UTC | |
|
Re: hash refrences
by belden (Friar) on Feb 04, 2011 at 19:40 UTC |