411 REFERENCE · Wikibooks
Perl Programming/Keywords/int
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Perl INIT ioctl Keywords
The int keyword
int returns the integer part of EXPRESSION or, if EXPRESSION is not specified, that of $_.
This function is inappropriate for rounding, as it truncates towards 0, and the machine-representation of floating-point numbers could return non-intuitive results.
Syntax
int EXPRESSION
int
Examples
The print
print int(842/169) . ', ' . int(1721/169) 5 and 10,183… 4, 10
Perl INIT ioctl Keywords