sub SBS_B2C{ my ($bin_date) = @_; my $year = 1900 + ($bin_date/365); #amended with ."\n" after merlyn's comments print $year."\n"; #output 2004.41643835616 print int($year); #output 20041 } SBS_B2C(38112);