mirror of https://github.com/pragma-/pbot.git
Added qalc calculator module
This commit is contained in:
parent
7139490067
commit
3baa1cf809
2031
data/factoids
2031
data/factoids
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
my $args = join ' ', @ARGV;
|
||||
|
||||
my $qargs = quotemeta $args;
|
||||
|
||||
my $result = `qalc $qargs`;
|
||||
|
||||
$result =~ s/^.*approx.\s+//;
|
||||
$result =~ s/^.*=\s+//;
|
||||
|
||||
print "$args = $result\n";
|
||||
# print "$result\n";
|
Loading…
Reference in New Issue