diff --git a/scripts/code-style.pl b/scripts/code-style.pl
index 2ae2e1a139d4d7bd6072d62d46017c496b10e7ef..796ed6c12229013e90775799b003cd9e0a08dbd9 100644
--- a/scripts/code-style.pl
+++ b/scripts/code-style.pl
@@ -134,7 +134,7 @@ while (<>) {
     $msg = "missing space after ','";
   }
   # spaces before and after, only foreach may use $foo=>bar
-  elsif (/[^ =|-|\+](\+|\-)[^ =>|-|\+]/ && $program && !/foreach/) {
+  elsif (/[^ =|\-|\+](\+|\-)[^ =>|\-|\+]/ && $program && !/foreach/) {
     $msg = "'$1' -> ' $1 '";
   }
   elsif (/[^ =](\*|==|\.=|=>|=|\|\|)[^ =>]/ && $program && !/foreach/) {