Results 1 to 3 of 3
Apr 6, 2013, 11:25 #1
- Join Date
- Apr 2013
- 0 Post(s)
- 0 Thread(s)
Why do I get a divide-by-zero error?
I found this forum thanks to an old post on how to check whether a number is an integer:
Originally Posted by KevinR
perl -e 'print "Result of division is not an integer.\n" if 14/7 =~/\D/' Illegal division by zero at -e line 1.
perl -e 'print "Fourteen divided by seven is two.\n" if 14/7 == 2' Fourteen divided by seven is two.