mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
24 lines
363 B
Perl
24 lines
363 B
Perl
|
#!/usr/bin/perl -w
|
||
|
|
||
|
# Quick and dirty by :pragma
|
||
|
|
||
|
|
||
|
my ($arguments, $response);
|
||
|
|
||
|
if ($#ARGV < 0)
|
||
|
{
|
||
|
print "Dumbass.\n";
|
||
|
die;
|
||
|
}
|
||
|
|
||
|
$arguments = join(" ", @ARGV);
|
||
|
|
||
|
if($arguments =~ m/[\$a-z]/i)
|
||
|
{
|
||
|
print("Illegal characters, please only use numbers and valid operators (+, -, /, *, etc).");
|
||
|
die();
|
||
|
}
|
||
|
|
||
|
$response = eval($arguments);
|
||
|
print "$arguments = $response";
|