Merge pull request #123 from GlitchMr/shorten-xor

ord(chr()) does nothing on integer, it's useless
master
Michael X 2012-09-24 12:18:05 -07:00
commit 5a8d77a2d5
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ handle query_raw => sub {
my @nums = grep(!/(xor|⊕)/, split(/\s+(⊕|xor)\s+/i, $_)); my @nums = grep(!/(xor|⊕)/, split(/\s+(⊕|xor)\s+/i, $_));
my $num = 0; my $num = 0;
foreach (@nums) { foreach (@nums) {
$num ^= ord(chr($_)) if /^\d+$/; $num ^= $_ if /^\d+$/;
return unless /^\d+$/; return unless /^\d+$/;
} }
return "$num" if $num; return "$num" if $num;