From 60f4518b353390ccd821bc973fd5ac7619deb526 Mon Sep 17 00:00:00 2001 From: James Smith Date: Mon, 20 Mar 2023 22:54:24 +0000 Subject: Update ch-1.pl --- challenge-209/james-smith/perl/ch-1.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/challenge-209/james-smith/perl/ch-1.pl b/challenge-209/james-smith/perl/ch-1.pl index 98ddd16e71..c5a908afd5 100644 --- a/challenge-209/james-smith/perl/ch-1.pl +++ b/challenge-209/james-smith/perl/ch-1.pl @@ -17,3 +17,9 @@ sub special_bit_chars { ($_[0]&&shift),shift until @_<2; scalar @_ } + +sub special_bit_chars_reverse { + my$f,pop?return-1:pop||return 1; + $f=!$f,pop||last while@_; + ~~$f +} -- cgit