print "$_ ", /(.*)(?{$countSpaces->()})/ ? "has 1 or no spaces\n" : "has more than one space\n";