Приглашаем посетить
Литература (lit-info.ru)

[Chapter 3] 3.2.76 int

PreviousChapter 3
Functions
Next
 

3.2.76 int

int EXPR

This function returns the integer portion of EXPR. If EXPR is omitted, it uses $_. If you're a C programmer, you'll often forget to use int in conjunction with division, which is a floating-point operation in Perl:

$average_age = 939/16;      # yields 58.6875 (58 in C)
$average_age = int 939/16;  # yields 58


PreviousHomeNext
3.2.75 indexBook Index3.2.77 ioctl