Perl Weekly Challenge 110: Valid Phone Numbers and Transposed File
These are some answers to the Week 110 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a couple of days (May 2, 2021). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
Task 1: Valid Phone Numbers
You are given a text file.
Write a script to display all valid phone numbers in the given text file.
Acceptable Phone Number Formats:
+nn nnnnnnnnnn
(nn) nnnnnnnnnn
nnnn nnnnnnnnnn
Input File:
Perl 7: A Risk-Benefit Analysis
At the recent Conference in the Cloud for Perl and Raku, Sawyer X (the pumpking of Perl) announced an ambitious plan for Perl 7. Since Perl 6 was renamed to Raku to better communicate its fundamental differences from the well known identity of Perl, major versions are now available again for Perl to leverage, and it is a very important step to show that the language is still developed and used. I completely agree with the motivation and ideals presented, and have thought a lot about the benefits and risks involved in such ideas long before I was aware of this project.
Thinking and Question of The Proposal for Perl 7 - day1
I write my thinking and question about Proposal for Perl 7.
1. MAJOR version when you make incompatible API changes,
First of all, I am wondering about this assumption.
This is because there are very few incompatible API changes in Perl's history (Perl 1, 2, 3, 4, 5).
If the Python developers are thinking this way, it makes sense.
Has Perl ever thought of this in history?
Perhaps Perl has kept the maximum backward compatibility even in the major version upgrade?
The fact about Perl (rather than theory or ideal) is that Perl has kept its backward compatibility so that it can execute the assets of older programs.
Perl has taken care of old users who use Perl for a long time and cannot easily change their habits.
I believe this is Perl's kindness.
Perl is a language that emphasizes facts, reality and work, practicality.
Perl 5 has been very successful because it keeps backword compatibility with Perl 4.
I believe that this idea will be very successful even when upgrading from Perl 5 to Perl 7.
Because it really succeeded.
Perl Weekly Challenge 109: Chowla Numbers and Four Square Puzzle
These are some answers to the Week 109 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a few days (April 25, 2021). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
Task 1: Chowla Numbers
Write a script to generate first 20 Chowla Numbers, named after, Sarvadaman D. S. Chowla, a London born Indian American mathematician. It is defined as:
C(n) = sum of divisors of n except 1 and n
Output:
0, 0, 0, 2, 0, 5, 0, 6, 3, 7, 0, 15, 0, 9, 8, 14, 0, 20, 0, 21
Originally, the task requested us to generate the first 37 Chowla numbers and I wrote implementations in 12 different languages based on that requirement. This requirement has now been amended to the first 20 Chowla numbers. I’ll fix the program and output for some implementations, but will leave some as they were developed.
Chowla Numbers in Raku
Please not yet-another-oo-system, let's support frameworks
I'm very keen to be actively deprecating and removing syntactic oddities that folks should already be prohibiting via good perlcritic policies (i.e linting) hopefully in their editors and CI pipelines.
And standard perl is a good way for code bases to prepare for the future and derive real benefits right now. Both build on the meritocracy approach of CPAN.
It is that meritocracy that brought us the object frameworks Moose (which people seemed to feel was too big) and then Moo+Type::Tiny (which people seem to feel is about right). There are many other frameworks (object systems) which perl's minimalist internal object functions enable people to write, if one of them strikes a better balance of trade off's then there is nothing to stop it supplanting Moo as number one.
Perl 7 Thoughts
Overall, I think the Perl 7 announcement is great news.
I only have one small objection:
Perl 7, not quite getting better yet
Hegel remarks somewhere that all great world-historic facts and personages appear, so to speak, twice. He forgot to add: the first time as tragedy, the second time as farce.
The Eighteenth Brumaire of Louis Napoleon - Karl Marx
Sawyer just announced his plans for perl 7. And while Perl 7 sounds like a lovely language, I do see a number of issues:
Cohabitation / Forking
The proposal is presented as a linear progress, I don't believe this is realistic. This would be fork much like the python 3 transition is (which also wanted to be a simple linear progression). As we all know, they're currently in year 12 of a 5 year transition.
There are several problems here. CPAN as an ecosystem is the one that is given most attention to (not without reason; it is without doubt the most important collection of Perl code), but it's not even the biggest problem.
Perl Weekly Challenge 108: Locate Memory and Bell Numbers
These are some answers to the Week 108 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a few days (April 18, 2021). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
Task 1: Locate Memory
Write a script to declare a variable or constant and print it’s location in the memory.
Locate Memory in Raku
CY's take on PWC#065
Good morning from the Asian timezone.
This is a part of Perl Weekly Challenge(PWC) and the followings are related to my solutions. If you want to challenge yourself on Perl, go to https://perlweeklychallenge.org, code the latest challenges, submit codes on-time (by GitHub or email)(before Monday GMT+0 00:00) if possible, before reading my blog post.
🤔
The Secret XS Diaries
I just rediscovered an old project of myself when I was learning Perl/XS and wanted to drop a hint to it here.
It might be useful for others who also have no idea how XS works and who would benefit from the approach and point of view of another XS newbie.
It is both the step-by-step description and a CPAN-ready Perl distribution.
You can find it on github:
Acme::The::Secret::XS::Diaries
Happy hacking.
Perl Weekly Challenge 107: Self-Descripting Numbers and List Methods
These are some answers to the Week 107 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a couple of days (April 11, 2021). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
Self-Descriptive Numbers
Write a script to display the first three self-descriptive numbers. As per Wikipedia, the definition of Self-descriptive Number is:
In mathematics, a self-descriptive number is an integer m that in a given base b is b digits long in which each digit d at position n (the most significant digit being at position 0 and the least significant at position b−1) counts how many instances of digit n are in m.
For example, 1210 is a four-digit self-descriptive number:
Cannot change password
Wouldn't it be nice to be able to change my (hacked) password for blogs.perl.org?
Unfortunately, the password change form complains that it couldn't verify my current password, which doesn't come as a surprise as there is no field on the form to enter it.
Contacting author of Net::Azure::StorageClient
I am trying to contact Junnama Noda author of Net::Azure::StorageClient
I have sent two emails now to the public email address listed in his public github profile and have received no bounce or response.
If anyone is in contact with him, please have him contact me
Dean
CY's Post on PWC#064 - my shortcomings
Task 1:
A runner has to run from the upper-left corner to the lower-right corner in a race. The stadium of this race is rectangular, and each square meter area has different level of difficulty (caused by sand, cement, grass, slope...). Our runner has to choose a path with the least difficulty to complete the race.
My description makes it look like something from a competitive programming problem. Maybe someone will discover sometimes I made sentimental names in the codes. (I was a long-distance runner in high school and university, by the way.)
The heart of my solution for this task is:
Perl Weekly Challenge 106: Maximum Gap and Decimal String
These are some answers to the Week 106 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a couple of days (April 4, 2021). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
Task 1: Maximum Gap
You are given an array of integers @N.
Write a script to display the maximum difference between two successive elements once the array is sorted.
If the array contains only 1 element then display 0.
Example:
Monthly Report - June

COVID-19 seems to be still haunting us but life is getting back to normal slowly. I had the pleasure to attend the first "Conference in the Cloud". It was 3 days event. I booked 3 days off from the work so that I can focus on the event without any interruptions. It was my first experience attending event in the cloud. I found it hard to focus on the talk in general.
Could it be as I was at home with kids running around?
The day one itself started on a very happy note with the announcement of "Perl 7" by Sawyer X. The entire day one was dedicated to this very topic. brian d foy even had his first book "Preparing for Perl 7" launched with the announcement. Thanks to the author brian d foy, I had the pleasure to read the first copy of the book. I simply loved it. The best introductory book on Perl 7 so far. Please go and check out yourself.
I plan to release SPVM 1.0 at the end of July.
I plan to release SPVM 1.0 at the end of July.
If you have any feedback on the bugs or features, please contact Github Issue or kimoto.yuki@gmail.com
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.


