My understanding of int is that it should return 2004 in this case. I tried to look up int on perldocs but the sites out reach at the moment.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);
In reply to int not working? by Scarborough
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |