diff options
| -rw-r--r-- | challenge-209/james-smith/perl/ch-1.pl | 6 |
1 files changed, 6 insertions, 0 deletions
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 +} |
