From mark at purdue.edu Sun Jun 16 14:32:44 2019 From: mark at purdue.edu (Mark Senn) Date: Sun, 16 Jun 2019 17:32:44 -0400 Subject: [Purdue-pm] my Perl Weekly Challenge 012 answer, etc. Message-ID: <27663.1560720764@pier.ecn.purdue.edu> See engineering.purdue.edu/~mark/pwc-012.pdf for my blog entry about solving the Perl Weekly Challenge 012 problems using Perl 6. In Perl 6 one can type ``[op] @array'' to do ``@array[0] op @array[1] op @array[2] ...' where op can be +, -, *, eq (string equality), lt (string less than), etc. In a two-dimensional array @part, ``[eq] @part[*;2]'' checks if every element in the third column (columns are numbered starting at zero) of @part are the same. The following Perl 6 code my @a = <<1 2.1 3 2.2 5 2.3 7 2.4 9>>; my @b = @a[1,3...*]; say ([+] @b)/@b.elems; prints 2.25, the average of all odd elements of @a. If "*" isn't used in a multiple context, you can read it as "whatever" and it usually makes sense. I'm working on many partway done blog entries including Finding without searching: finding word ladder puzzle solutions using matrix arithmetic and How to check your math homework [intended for grades K through PhD and especially first-year Engineering Students at Purdue] I still need to make a blog table of contents and index. Anthony J. Smith gave a "Using WordPress" talk at the Purdue Perl Mongers meeting on Wednesday, June 12, 2019. He's the author of "Working With WordPress" at https://www.officialajsmith.com/blog/. The first paragraph there is Have you ever wanted to setup a WordPress site, but don't want to use WordPress.com or an expensive paid host ? Well you have come to the right place. In this article I will go over how to setup a WordPress site on Google Cloud. Mark Senn, Software Engineer, Engineering Computer Network, Purdue University