From c64c41608db9f0a6447f41a34b9a7408e326b66f Mon Sep 17 00:00:00 2001 From: GlitchMr Date: Mon, 24 Sep 2012 21:06:15 +0200 Subject: [PATCH] ord(chr()) does nothing on integer, it's useless --- lib/DDG/Goodie/Xor.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/DDG/Goodie/Xor.pm b/lib/DDG/Goodie/Xor.pm index 866c894cf..15bb782b2 100644 --- a/lib/DDG/Goodie/Xor.pm +++ b/lib/DDG/Goodie/Xor.pm @@ -11,7 +11,7 @@ handle query_raw => sub { my @nums = grep(!/(xor|⊕)/, split(/\s+(⊕|xor)\s+/i, $_)); my $num = 0; foreach (@nums) { - $num ^= ord(chr($_)) if /^\d+$/; + $num ^= $_ if /^\d+$/; return unless /^\d+$/; } return "$num" if $num;