Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 14 lines (11 sloc) 230 Bytes
#!/usr/bin/perl
use strict;
# calc
print "Expression?\n";
while (1) {
print '> ';
chomp(my $c = <STDIN>);
exit(0) if(($c =~ /^\s*:q\s*/));
my $i = eval($c);
printf("%d 0x%x 0%o %b %f %s \n", $i, $i, $i, $i, $i, $i);
}