diff options
Diffstat (limited to 'challenge-120/abigail/perl/ch-1.pl')
| -rw-r--r-- | challenge-120/abigail/perl/ch-1.pl | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/challenge-120/abigail/perl/ch-1.pl b/challenge-120/abigail/perl/ch-1.pl new file mode 100644 index 0000000000..b5aa1b4b9d --- /dev/null +++ b/challenge-120/abigail/perl/ch-1.pl @@ -0,0 +1,29 @@ +#!/opt/perl/bin/perl + +use 5.032; + +use strict; +use warnings; +no warnings 'syntax'; + +use experimental 'signatures'; +use experimental 'lexical_subs'; + +# +# See ../README.md +# + +# +# Run as: perl ch-1.pl < input-file +# + +# +# This is just week 119 with different constants +# + + +while (<>) { + say + ($_ & 0x55) << 1 # Odd bits shifted one the right + | ($_ & 0xAA) >> 1 # Even bits shifted one to the left +} + |
