3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 19:22:40 +01:00

Added qalc calculator module

This commit is contained in:
Pragmatic Software 2015-05-08 05:02:57 -07:00
parent 7139490067
commit 3baa1cf809
2 changed files with 1204 additions and 843 deletions

File diff suppressed because it is too large Load Diff

16
modules/qalc.pl Executable file
View File

@ -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";