Skip to content

Commit

Permalink
Mention that int('Inf') produces Inf which isn't an integer
Browse files Browse the repository at this point in the history
There are still people surprised by it, e.g.
https://www.perlmonks.org/?node_id=11159579
  • Loading branch information
E. Choroba authored and choroba committed Aug 27, 2024
1 parent 44c2a9a commit 7ec1801
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pod/perlfunc.pod
Original file line number Diff line number Diff line change
Expand Up @@ -3781,6 +3781,9 @@ the L<C<sprintf>|/sprintf FORMAT, LIST>,
L<C<printf>|/printf FILEHANDLE FORMAT, LIST>, or the
L<C<POSIX::floor>|POSIX/C<floor>> and L<C<POSIX::ceil>|POSIX/C<ceil>>
functions will serve you better than will L<C<int>|/int EXPR>.
Moreover, C<int 'Inf'> produces Inf (see
L<perldata/Special floating point: infinity (Inf) and not-a-number (NaN)>
for explanation), but so do all the alternative methods mentioned above.

=item ioctl FILEHANDLE,FUNCTION,SCALAR
X<ioctl>
Expand Down

0 comments on commit 7ec1801

Please sign in to comment.