From e15d009623ac7ee53f19ea395f14b0fd3737ee81 Mon Sep 17 00:00:00 2001 From: boblied Date: Fri, 25 Sep 2020 09:12:30 -0500 Subject: Stray character caused syntax error --- challenge-079/bob-lied/perl/lib/CountSetBit.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'challenge-079') 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; } -- cgit