Duke's utils
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
389 B

#!/usr/bin/perl -w
use strict;
use warnings;
use Regexp::Common qw /number/;
while (<DATA>) {
/^$RE{num}{int}{-keep}$/ and print "$1 Integer\n";
/^$RE{num}{real}{-keep}$/ and print "$1 Real\n";
/^$RE{num}{real}{-base => 10}{-keep}$/ and print "$1 Real and base 10\n";
}
__DATA__
0
00
0e0
0.0
3.14
42
1e-10
0xdeadbeef
fuck you
1.ieatpoop