$cost_associated_with_lost =
($cost_differential +
$cost_of_acquiring_new_employee +
$cost_of_training_new_employee +
$cost_paid_to_integrate_new_employee +
$cost_of_excess_overtime_payment_to_compensate_temporary_performance_downfall +
$cost_of_loss_of_production_or_loss_of_customers +
$monetary_value_of_loss_of_morale_of_remaining_employees)
* (1 + $turnover_rate_of_newcomer_to_organization)
####
foreach (1..$total_number_of_years) {
$cost_differential += ( $annual_remuneration_of_new_employee - $annual_remuneration_of_person_leaving ) / (1 + $interest_rate_paid_by_employer / 100)**$_
}
##
##
$total_number_of_years = 10;
$interest_rate_paid_by_employer = 10;
$annual_remuneration_of_person_leaving = 64800;
$annual_remuneration_of_new_employee = 60380;
$cost_of_acquiring_new_employee = 3150;
$cost_of_training_new_employee = 10000;
$cost_paid_to_integrate_new_employee = 48600;
$cost_of_excess_overtime_payment_to_compensate_temporary_performance_downfall = 1000;
$cost_of_loss_of_production_or_loss_of_customers = 55440;
$monetary_value_of_loss_of_morale_of_remaining_employees = 3000;
$turnover_rate_of_newcomer_to_organization = 0.1;
##
##
#!/usr/bin/perl
use warnings;
use strict;
my $line = ;
chomp ($line);
my @data = split /\s+/, $line;
my $total_number_of_years = shift( @data );
my $interest_rate_paid_by_employer = shift( @data );
my $annual_remuneration_of_person_leaving = shift( @data );
my $annual_remuneration_of_new_employee = shift( @data );
my $cost_differential = 0;
foreach (1..$total_number_of_years) {
$cost_differential += ( $annual_remuneration_of_new_employee - $annual_remuneration_of_person_leaving ) / (1 + $interest_rate_paid_by_employer / 100)**$_
}
my $turnover_rate_of_newcomer_to_organization = pop( @data );
my $cost_of_losing_good_people = 0;
foreach (@data) {
$cost_of_losing_good_people += $_;
}
$cost_of_losing_good_people += $cost_differential;
$cost_of_losing_good_people *= (1 + $turnover_rate_of_newcomer_to_organization);
$cost_of_losing_good_people = int( $cost_of_losing_good_people );
print "Cost of Losing Good People = \$$cost_of_losing_good_people\n";
__DATA__
10 10 64800 60380 3150 10000 48600 1000 55440 3000 0.1