develooper Front page | perl.beginners | Postings from June 2023

type checks

Thread Next
From:
wesley
Date:
June 2, 2023 07:56
Subject:
type checks
Message ID:
edf85981be45d4e4405c37a44f5cce5ed2178156@mxcloud.app
Hello,

I am not sure, is there any external module to check types in such mathematical calculation?

$ perl -le 'print ("3" + undef)'
3
$ perl -le 'print ("3" + 4)'
7

I hope the program will throw errors when the above happens.

Thanks.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About