Help for this page

Select Code to Download


  1. or download this
    sub is_numeric {
      ($_[0] & ~ $_[0]) eq "0";
    }
    
  2. or download this
    print +(isnum($_) ? "is a number" : "not a number"), ": $_", $/
      for qw( 1 2.2 3e3 4. .5);
    ...
    is a number: 3e3
    is a number: 4.
    is a number: .5