diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2022-11-22 07:49:17 +0000 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2022-11-22 07:49:17 +0000 |
| commit | 219a6e284eb1af17feba647964c0f350fa156125 (patch) | |
| tree | 63d83c3305e3a6c05d39a9ca473f5d0ffb1d1a7c /challenge-192 | |
| parent | 62cd59ab1bc620f0a9a621801645f61b2afba4fe (diff) | |
| download | perlweeklychallenge-club-219a6e284eb1af17feba647964c0f350fa156125.tar.gz perlweeklychallenge-club-219a6e284eb1af17feba647964c0f350fa156125.tar.bz2 perlweeklychallenge-club-219a6e284eb1af17feba647964c0f350fa156125.zip | |
- Added solution by Olivier Delouya.
Diffstat (limited to 'challenge-192')
| -rw-r--r-- | challenge-192/olivier-delouya/perl/ch-1.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/challenge-192/olivier-delouya/perl/ch-1.sh b/challenge-192/olivier-delouya/perl/ch-1.sh new file mode 100644 index 0000000000..56985ff1a0 --- /dev/null +++ b/challenge-192/olivier-delouya/perl/ch-1.sh @@ -0,0 +1,5 @@ +perl -se '$a=sprintf "%b", $x; $a =~ s/(0|1)/$1 ? 0:1/eg; print eval "0b$a"' -- -x=5 + +perl -se '$a=sprintf "%b", $x; $a =~ s/(0|1)/$1 ? 0:1/eg; print eval "0b$a"' -- -x=4 + +perl -se '$a=sprintf "%b", $x; $a =~ s/(0|1)/$1 ? 0:1/eg; print eval "0b$a"' -- -x=6 |
