aboutsummaryrefslogtreecommitdiff
path: root/challenge-055
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2020-04-11 14:05:12 +0100
committerGitHub <noreply@github.com>2020-04-11 14:05:12 +0100
commit1ac7b18e75929a0484208181da015c2cf4a06732 (patch)
treedb1bb536cd48f1dc141449f1fc3c42ae062093d0 /challenge-055
parent65d163bc9208ec056bf376d0b4802b4b18fad599 (diff)
parent82fa4a439d44441b48ed93a35d2f4580dd6667b4 (diff)
downloadperlweeklychallenge-club-1ac7b18e75929a0484208181da015c2cf4a06732.tar.gz
perlweeklychallenge-club-1ac7b18e75929a0484208181da015c2cf4a06732.tar.bz2
perlweeklychallenge-club-1ac7b18e75929a0484208181da015c2cf4a06732.zip
Merge pull request #1548 from LubosKolouch/chal_055_LK
Cosmetic changes
Diffstat (limited to 'challenge-055')
-rw-r--r--challenge-055/lubos-kolouch/perl/ch-1.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-055/lubos-kolouch/perl/ch-1.pl b/challenge-055/lubos-kolouch/perl/ch-1.pl
index 72c81ba0e0..f6145d3e5c 100644
--- a/challenge-055/lubos-kolouch/perl/ch-1.pl
+++ b/challenge-055/lubos-kolouch/perl/ch-1.pl
@@ -30,12 +30,12 @@ sub do_flip {
my ( $l_count, $r_count, $input ) = @_;
my @binary = split //, $input;
-
+
for my $str_pos ( $l_count .. $r_count ) {
$binary[$str_pos] = $binary[$str_pos] == 1 ? 0:1;
}
- return join "", @binary;
+ return join '', @binary;
}
my $result = process_all_flips("010");