aboutsummaryrefslogtreecommitdiff
path: root/challenge-079
diff options
context:
space:
mode:
authorboblied <boblied@gmail.com>2020-09-25 09:12:30 -0500
committerboblied <boblied@gmail.com>2020-09-25 09:12:30 -0500
commite15d009623ac7ee53f19ea395f14b0fd3737ee81 (patch)
treec1151e7f5e97288b9346393986e1df4b5b246f93 /challenge-079
parent0205bba3b8a2eb1079bb3cc34b06aa16d8c81d74 (diff)
downloadperlweeklychallenge-club-e15d009623ac7ee53f19ea395f14b0fd3737ee81.tar.gz
perlweeklychallenge-club-e15d009623ac7ee53f19ea395f14b0fd3737ee81.tar.bz2
perlweeklychallenge-club-e15d009623ac7ee53f19ea395f14b0fd3737ee81.zip
Stray character caused syntax error
Diffstat (limited to 'challenge-079')
-rw-r--r--challenge-079/bob-lied/perl/lib/CountSetBit.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/challenge-079/bob-lied/perl/lib/CountSetBit.pm b/challenge-079/bob-lied/perl/lib/CountSetBit.pm
index 1733d4e676..068be81e2a 100644
--- a/challenge-079/bob-lied/perl/lib/CountSetBit.pm
+++ b/challenge-079/bob-lied/perl/lib/CountSetBit.pm
@@ -1,3 +1,4 @@
+## Please see file perltidy.ERR
# vim:set ts=4 sw=4 sts=4 et ai wm=0 nu:
#=============================================================================
# CountSetBit.pm
@@ -17,18 +18,17 @@ use feature qw/ signatures /;
no warnings qw/ experimental::signatures /;
require Exporter;
-our @ISA = qw(Exporter);
-our @EXPORT = qw();
+our @ISA = qw(Exporter);
+our @EXPORT = qw();
our @EXPORT_OK = qw();
-sub new($class, $n)
+sub new ( $class, $n )
{
$class = ref($class) || $class;
my $self = {
_n => $n,
- _sum => 0,
- };
+ _sum => 0, };
bless $self, $class;
return $self;
}
@@ -40,14 +40,14 @@ sub run($self)
return ( $self->{_sum} % 1000000007 );
}
-sub _bitsOf($self, $n)a
+sub _bitsOf ( $self, $n )
{
my $count = 0;
while ( $n > 0 )
{
$count++;
- $n = $n & ($n-1);
+ $n = $n & ( $n - 1 );
}
return $count;
}