3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-28 21:52:35 +01:00
pbot/modules/qalc.pl

17 lines
239 B
Perl
Raw Normal View History

2015-05-08 14:02:57 +02:00
#!/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";