
E. Choroba
- Website: www.perlmonks.org/?node_id=832495
Recent Actions
-
Commented on Perl Weekly Challenge 200: Arithmetic Slices and Seven Segment Display
Your Perl solution to Task 1 doesn't output 3 7 11 as one of the solutions to 3 5 7 9 11. Does it fit your definition of a slice?...
-
Posted Array Degree to E. Choroba
The Weekly Challenge 189/2
The Task 2 was rather interesting in the week 189.You are given an array of 2 or more non-negative inte…
-
Commented on What happened to Perl 7?
Shouldn't bareword_filehandles be disabled rather than enabled?...
-
Commented on The ordering operators
I also use it sometimes when there are three different actions based on a comparison, turning something like for my $x (1, 2, 3) { for my $y (1, 2, 3) { print "$x $y "; if ($x == $y)...
-
Commented on Access the Tesla API with Perl!
Matthew Persico: https://opensource.com/article/18/1/my-delorean-runs-perl...
-
Posted Eertree: Palindromic Tree to E. Choroba
The Weekly Challenge 145
The Task 2 of the Weekly Challenge #145 asked us to build a Palindromic Tree. It also linked to a ="https://medium.com/@alessiopiergiacomi/eertree-or-palindr…
-
Commented on In defence of OOP
Good points! Looking forward for the next parts....
-
Commented on Is it possible to return to development with traditional P5P mailing lists?
What problem should moving to a mailing list solve? The mailing list was public, anyway, so apart from security issues, there was no "secret room" for the elite to discuss stuff before disclosing it. GitHub just makes participation easier for...
-
Posted Perl Weekly Challenge 061: Product SubArray And IPv4 Partition to E. Choroba
Product SubArray
Given a list of 4 or more numbers, write a script to find the contiguous sublist that has the maximum product. The length of the sublist is irrelevant; your job is to maximize the product.
Example
… -
Posted Perl Weekly Challenge 060: Excel Column And Find Numbers to E. Choroba
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,…
-
Posted Perl Weekly Challenge 059: Linked List and Bit Sum to E. Choroba
Linked List
You are given a linked list and a value k. Write a script to partition the linked list such that all nodes less than k come before nodes greater than or equal to k. Make sure you preserve the original rel…
-
Posted Perl Weekly Challenge 058: Compare Version and Ordered Lineup to E. Choroba
Compare Version
Compare two given version number strings v1 and v2 such that:
- If v1 > v2 return 1
- If v1 < v2 return -1 …
-
Posted Perl Weekly Challenge 057: Invert Tree and Shortest Unique Prefix to E. Choroba
Shortest Unique Prefix
Write a script to find the shortest unique prefix for each each word in the given list. The prefixes will not necessarily be of the same length.
Sample Input
[ "alphabet", "book", "…
-
Posted Perl Weekly Challenge 056: Diff-K and Path Sum to E. Choroba
Diff-K
You are given an array @N of positive integers (sorted) and another non negative integer $k. Write a script to find if there exists 2 indices $i and $j such that
$A[$i] - $A[$j…
-
Posted Perl Weekly Challenge 054: Kth Permutation Sequence + Collatz Conjecture to E. Choroba
Kth Permutation Sequence
Write a script to accept two integers n (>=1) and k (>=1). It should print the k-th permutation of n integers.
For example, n=3 and k=4, the po…
-
Posted Perl Weekly Challenge 053: Rotate Matrix and Vowel Strings to E. Choroba
Rotate Matrix
Write a script to rotate the following matrix by given 90/180/270 degrees clockwise.
[ 1, 2, 3 ] [ 4, 5, 6 ] [ 7, 8, 9 ]
For example, if you rotate by 90 degrees then expected r…
-
Posted Perl Weekly Challenge 052: Stepping Numbers & Lucky Winner to E. Choroba
Stepping Numbers
Write a script to accept two numbers between 100 and 999. It should then print all Stepping Numbers between them.
A number is called a stepping number if the adjacent digits have a difference of 1.…
-
Posted Perl Weekly Challenge 051: 3 Sum and Colourful Numbers to E. Choroba
3 Sum
Given an array
@L
of integers. Write a script to find all unique triplets such that a + b + c is same as the given target T. Also make sure a <= b <= c… -
Posted Perl Weekly Challenge 050: Merge Intervals and Noble Integer to E. Choroba
Merge Intervals
Write a script to merge the given intervals where ever possible.
[2,7], [3,9], [10,12], [15,19], [18,22]
The script should merge [2, 7] and [3, 9] together to return …
-
Commented on Perl Weekly Challenge: Smallest Multiple and LRU Cache
Note that $set->(3, 7) for 1 .. $capacity; removes all other keys from the cache (improbable for caches with a large capacity, though)....
-
Posted Perl Weekly Challenge 049: Smallest Multiple and LRU Cache to E. Choroba
Smallest Multiple
Write a script to accept a positive number as command line argument and print the smallest multiple of the given number consists of digits 0 and 1.
For example: For given number …
-
Posted Perl Weekly Challenge 048: Survivor and Palindrome Dates to E. Choroba
Survivor
There are 50 people standing in a circle in position 1 to 50. The person standing at position 1 has a sword. He kills the next person i.e. standing at position 2 and pass on the sword to the immediate next i.e. person standing a…
-
Posted Perl Weekly Challenge 046: Cryptic Message & Is the Room Open? to E. Choroba
Cryptic Message
The communication system of an office is broken and message received are not completely reliable. To send message Hello, it ended up sending these following:
H x l 4 ! c e
-
Posted Perl Weekly Challenge 045: Square Secret Code & Source Dumper to E. Choroba
Square Secret Code
The square secret code mechanism first removes any space from the original message. Then it lays down the message in a row of 8 columns. The coded message is then obtained by reading down the columns going left to righ…
-
Posted Perl Weekly Challenge 044: One Hundred, Two Hundred to E. Choroba
Only 100, please
You are given a string “123456789”. Write a script that would insert ”+” or ”-” in between digits so that when you evaluate, the result should be 100.
We c…
-
Posted Perl Weekly Challenge 043: Olympic Rings and Self-Descriptive Numbers to E. Choroba
Olympic Rings
There are 5 rings in the Olympic Logo [as shown below]. They are colour coded as in Blue, Black, Red, Yellow and Green. We have allocated some numbers to these rings as below: Blue: 8, Yellow: 7, Green: 5, Red: 9. Th…
-
Posted Perl Weekly Challenge 040: Multiple Arrays & Sort SubList to E. Choroba
Multiple Arrays
You are given two or more arrays. Write a script to display values of each list at a given index.
For example:
Array 1: [ I L O V E Y O U ] Array 2: [ 2 4 0 3 2 0 1 9 ] Array 3: [ ! ?…
-
Posted Perl Weekly Challenge 039: Guest Book and Reverse Polish Notation to E. Choroba
Guest Book
A guest house had a policy that the light remain ON as long as the at least one guest is in the house. There is guest book which tracks all guest in/out time. Write a script to find out how long in minutes the light were ON.
… -
Posted Perl Weekly Challenge 038: Date Finder and Word Game to E. Choroba
Date Finder
Create a script to accept a 7 digits number, where the first number can only be 1 or 2. The second and third digits can be anything 0-9. The fourth and fifth digits corresponds to the month i.e. 01, 02, 03…, 11, 12. And the last 2 digits resprese…
-
Posted Perl Weekly Challenge 037: Weekdays and Daylight Gain/Loss to E. Choroba
Write a script to calculate the total number of weekdays (Mon-Fri) in each month of the year 2019.
I used the core module Time::Piece and its companion from the same distribution…

Comment Threads
-
Joseph Brenner commented on
What happened to Perl 7?
It's excellent to have this clarified-- some people haven't gotten the word that the consensus is to stay with backwards compatibility-- I was talking to some folks who you would think would know better who were expecting some major breakage from the Perl 7 release.
I was wondering about this, though:
"At some point in the future, the PSC may decide that the set of features, taken together, represent a big enough step forward to justify a new baseline for Perl. If that happens, then the version will be bumped to 7.0."
Couldn't this be firmed up at this point? I wou…
-
Dimitrios Kechagias commented on
What happened to Perl 7?
IMHO announcing Perl 7, which was picked up by the non-perl community as clear "signs of life" from what they thought of as an irrelevant/dying language, and then taking it back was quite a big step backwards, so I'd thought we'd want to rectify that as quickly as possible.
… - Elvin Aslanov commented on What happened to Perl 7?
-
Smylers commented on
What happened to Perl 7?
Thank you for such a clear update. As somebody who only manages intermittently to follow what's happening with the Perl core, this is really useful, and explains several things I'd be wondering about.
-
laurent_r commented on
Perl Weekly Challenge 200: Arithmetic Slices and Seven Segment Display
Hi Choroba, thanks for your comment. It appears that we don't understand the task in the same way. My understanding of the task is that the differences between any three *consecutive* elements of the original array of integers should be the same. 3 7 11 is indeed an arithmetic sequence, but these numbers are not consecutive items in the original 3 5 7 9 11 input sequence.

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.