- or download this
use warnings;
...
# Generates a warning that causes the handler to throw
# the error
if($string == 5) {print "Yep, \$string == 5\n"}
- or download this
use Scalar::Util;
.
...
$x > 0) {
print "It's a positive number - not necessarily an integer";
}
- or download this
use Scalar::Util;
.
...
$x > 0 && $x == int($x)) {
print "It's a positive integer";
}
- or download this
use Scalar::Util;
use warnings;
...
Outputs:
5.0000000000000000000000000000001
looks like a positive integer