[Chapter 3] 3.2.76 int
Author: Larry Wall, Tom Christiansen & Randal L. Schwartz
Date: 1999-07-02T01:50:45Z

#

| Chapter 3 Functions |

### 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

3.2.75 index |  | 3.2.77 ioctl