Robbie Hatley's Solutions To The Weekly Challenge #286
For those not familiar with "The Weekly Challenge", it is a weekly programming puzzle with two parts, cycling every Sunday. You can find it here: The Weekly Challenge The Weekly Challenge for the week of 2024-09-08 through 2024-09-14 is #286. Its tasks are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 286-1: "Self Spammer" Submitted by: David Ferrone Write a program which outputs one word of its own script source code at random. A word is anything between whitespace, including symbols. Example 1: If the source code contains a line such as: 'open my $fh, "<", "ch-1.pl" or die;' then the program would output each of the words { open, my, $fh,, "<",, "ch-1.pl", or, die; } (along with other words in the source) with some positive probability. Example 2: Technically 'print(" hello ");' is *not* an example program, because it does not assign positive proba