Help for this page
#!/bin/perl -w use strict; my $numbers="1 1.0 3.547 92.34 12 .25 23.00 23.01 343.2234"; ... print "$nb is an integer\n" if( !$2 || ($2=~ /^0+$/) ); # keep th +ose with no decimal parts # or with + a deciaml part only made of 0's }
1 is an integer 12 is an integer ... 12 is an integer 25 is an integer 23.00 is an integer