From 66e41d2ebc60e26aeeb34afd88f527a3d564e4f6 Mon Sep 17 00:00:00 2001 From: wanderdoc Date: Mon, 11 May 2020 18:10:30 +0200 Subject: Solutions to challenge-060. --- challenge-060/wanderdoc/perl/ch-1.pl | 64 ++++++++++++++++++++++++++++++++++++ challenge-060/wanderdoc/perl/ch-2.pl | 55 +++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 challenge-060/wanderdoc/perl/ch-1.pl create mode 100644 challenge-060/wanderdoc/perl/ch-2.pl diff --git a/challenge-060/wanderdoc/perl/ch-1.pl b/challenge-060/wanderdoc/perl/ch-1.pl new file mode 100644 index 0000000000..339f50012b --- /dev/null +++ b/challenge-060/wanderdoc/perl/ch-1.pl @@ -0,0 +1,64 @@ +#!perl +use strict; +use warnings FATAL => qw(all); + +=prompt +Write a script that accepts a number and returns the Excel Column Name it represents and vice-versa. +Excel columns start at A and increase lexicographically using the 26 letters of the English alphabet, A..Z. After Z, the columns pick up an extra "digit", going from AA, AB, etc., which could (in theory) continue to an arbitrary number of digits. In practice, Excel sheets are limited to 16,384 columns. +Example: +Input Number: 28 Output: AB +Input Column Name: AD Output: 30## Task 2: Bit Sum +=cut + + +my $re_num = qr/^[0-9]+$/; +my $re_alp = qr/^[A-Z]+$/i; + +my $input = shift or die "Usage: