Spoiler Alert: This weekly challenge deadline is due in a few days from now (on February 25, 2024 at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 1: Smaller than Current
You are given a array of integers, @ints.
Write a script to find out how many integers are smaller than current i.e. foreach ints[i], count ints[j] < ints[i] where i != j.
Hi everybody, just a quick one this week. Again it's been a very busy week, so I wrote this one quick to print the sorted list of all common characters in all the words provided. That's the simple explanation of this week's challenge.
Here's the code:
my @results;
my $first_word = shift;
for my $letter (split(//, $first_word)) {
push(@results, lc($letter)) if (grep {$_ =~ /$letter/i} @ARGV) == @ARGV;
}
@results = sort @results;
say $_ foreach @results;
The Perl and Raku Conference for 2023 will again feature a Hackathon Room. On July 10th, the Marketing Committee plans to coordinate activities for projects that have a broad impact on Perl.
We hope to involve 2-3 high impact projects and any number of smaller projects.
The committee will provide logistical and non-coding support for projects that want it. We want to help by:
matching people to projects and projects to people
keeping a record of commits and achievements for a post-event blog post
answer other questions like "where are bathrooms?" and "what is the wifi password?"
Interested projects please comment on this post or contact us using marketing(at)perlfoundation(dot)org
Please note that anyone is welcome to use the room to hack on their project and to solicit help for it subject to the Conference SoC. This room is available on both the day before and the day after the conference. The wiki page for the Hackathon room is here
I invite everyone involved in foss Perl projects to invest some time in being inclusive by creating and marking a few open issues/bugs with the label first-timers-only. The first-timers-only label explicitly announces:
I'm willing to hold your hand so you can make your first PR. This issue is a bit easier than normal. And anyone who's already contributed to open source isn't allowed to touch this one!
First timer contributions should very small and easy. But this makes it easier for the contributor to get the hang of the contribution process rather than the contribution itself. Remember, this isn't as much about getting your project features implemented quickly as it is about helping first timers have a welcoming experience.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on February 18, 2024 at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 2: Merge Strings
You are given two strings, $str1 and $str2.
Write a script to merge the given strings by adding in alternative order starting with the first string. If a string is longer than the other then append the remaining at the end.
Perl is a versatile and powerful programming language that can be used for various tasks, including sending and receiving email. In this article, we will explore some of the modules and methods that can help you accomplish this goal.
Sending Email with Perl
There are different ways to send email with Perl. One way is to use the Email::MIME module to create and parse email messages, and the Email::Sender module to send them using various transports, such as SMTP or Sendmail. Another way is to use the Mail::Send module to create mail messages and send them using your local mail agent.
Example: Sending an Email with Email::MIME and Email::Sender
Here is an example of sending an email with Perl using Email::MIME and Email::Sender:
Asked to blog, my first reply would be "I do not blog". And I don't. Usually.
Reading the reports from the other participants of the PTS 2023 in Lyon, I however see the value to those that did not have the chance to participate.
Some history
Being the only participant that attended all previous events too, some history might be to the point.
This event started in 2008 when is was organized in Oslo with no agenda at all. The organizers (Salve) had the vague idea to get people from the perl world together in a meeting and discuss "things" that were related to "Quality" and "Testing". The organizers invited people that they thought to be of value and involved enough to get somewhere. Here are a few lines of that initial mail:
I am writing this on my flight home from the PTS as I am terrible at writing things as they happen. :-)
The PTS proved to be a very valuable event, as it always has in the past. I am glad it is able to occur again in the wake of covid. One of the first things the group discussed was the lack of motivation in recent years when we could not meet, and how simply coming together again solved that problem for most of us.
The first day largely became about important discussions for the toolchain group. Some included a majority of attendees, others were composed of smaller subsets depending on the topic.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on February 18, 2024 at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 1: Maximum Pairs
You are given an array of distinct words, @words.
Write a script to find the maximum pairs in the given array. The words $words[i] and $words[j] can be a pair one is reverse of the other.
Example 1
Input: @words = ("ab", "de", "ed", "bc")
Output: 1
There is one pair in the given array: "de" and "ed"
Hi ! Everyone there ! How are you ?
I am a Perl script programmer for business Server at /cgi-bin/. Recently I moved my Server from Perl 5.8.8. (Fedora Code 7) to Perl 5.32.1 (Rocky9.1).
After the movement a pair of Perl scripts (script_main.pl and script_sub.pl), in which I integrated the minor script_sub.pl into the main part (script_main.pl) by using "require".
In the main script_main.pl, I just inserted the following line,
require 'script_sub.pl';
By this way, two scripts worked as if one. While Perl version was 5.8.8. (Redhat Fedora Core 7) this way worked.
However, it appeared that when in Perl 5.32.1 (Rocky9.1) it encountered an error. I studied a little bit of Perl 5.32.1. There are "require", "use", and "import" as possible vocabulary. In my case, it is just joining two pieces of Perl code by the way of "require". What do you suggest in order to chop down into two pieces from a long full Perl script code CGI, and then to join them together ?
2023 has been a very Perl-centric year for me so far!
These days I spend a lot of time in Toronto. Back in January when I heard that the TPRC conference would be held there I joined the planning group post-haste. They still needed a venue and I helped them find the perfect one. We'll be right in the middle of the best part of that great city. I encourage you all to come. This one's gonna be great!
Around the same time, TINITA told me that the Perl Toolchain Summit was happening again in Lyon again (first since 2019). I really needed to reunion with my Perl family, so I bugged BOOK until he said "Come on over".
After a meeting around an actual physical table at the Perl Toolchain Summit last week, the three of us were back to our regular video calls. The call was longer than usual, as we delved into the code of CPAN.pm.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on February 11, 2024 at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 1: Odd Character
You are given two strings, $s and $t. The string $t is generated using the shuffled characters of the string $s with an additional character.
Write a script to find the additional character in the string $t.
This post is adapted from my notes and recollection of the welcome speech I gave on the morning of Thursday April 27, 2023, just before the initial stand-up.
This post is brought to you by Booking.com, the Diamond sponsor for the Perl Toolchain Summit 2023.
Booking.com is proud to sponsor the 2023 Perl Toolchain Summit as Perl continues to be a vital piece of our technology stack. We continue to rely on the Perl platform and tooling to serve millions of customers every day, helping them experience the world. Other than our interest in the evolution and modernization of the platform and tooling, the PTS is also a great opportunity to connect with the larger community and share learnings about how other companies and projects are tackling the challenges of working with Perl at scale (talking about both in systems and teams scalability), and how Perl fits an ever-changing and diverse technological landscape in other organizations.
This is not exhaustive at all and is based on github release notifications rather than MetaCPAN recent. If your perl project uses github releases please let me know so I subscribe to them. I also post them to Perl Programmers.
EPrints 3.4.5-rc1
EPrints is a document management system aimed at Higher Educational institutions and individuals. EPrints has been used to provide Open Access to research results, sharing of educational resources and providing portfolios of work. It has a flexible metadata and workflow model to support varied business needs as well as interaction with other Web and institutional systems.
EPrints 3.4.5 release candidate 1 is now available on GitHub. Full release is planned for release shortly.
Request Tracker 5.0.4
RT is an enterprise-grade issue tracking system. It allows organizations
to keep track of what needs to get done, who is working on which tasks,
what's already been done, and when tasks were (or weren't) completed.
Hello everybody! Back this week for weekly challenge 215, where we look for unsorted words and sets of zeros. This week both challenges took me only about 10-15 minutes each. The usual disclaimer about an early post, so don't read spoilers if you want to do the challenge yourself.
Odd One Out
This one's a very simple task to print the number of words that are not alphabetically sorted. Here's the code:
#!/usr/bin/perl
use strict;
use v5.24;
my $removed = 0;
foreach (@ARGV) {if ($_ ne join('', sort(split(//, $_)))) {$removed++}}
say $removed;
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on February 4, 2024 at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 2: Reverse Vowels
You are given a string, $s.
Write a script to reverse all the vowels (a, e, i, o, u) in the given string.
After a break of four years, it has been my privilege to attend the 13th Perl Toolchain Summit (née Perl QA Hackathon). This is the third time the summit has been held in Lyon and the tenth summit I have been able to attend. PTS is a really important event in the Perl calendar where those working on the Perl toolchain and in Perl QA get to meet together for four days of discussions, decisions on the future of Perl, and hacking.
Arriving late on Wednesday evening, I had an overfull list of things I wanted to talk to people about and work I wanted to do. In the end I didn't even get half way though my list, but that was expected.
Today, the PSC met up … in person! We’re all in Lyon for the Perl Toolchain Summit.
Meantime, although we had a very long conversation, it boils down to just a couple things:
We talked a very long time (well, 45m) about GitHub issues labeled “BBC” and marking them “needs triage” (meaning: more info) or “not a release blocker” or “release blocker”. This will require more work, but we made good progress.
We discussed HTTP::Tiny, security, and how best to bootstrap CPAN and stay secure. More soon.
We discussed Test2 in core, which is now its own thread on p5p, enjoy!
Hi everybody! This week again because of time I only finished the first challenge of The Weekly Challenge. However, because work for my client requires Python, I'm busy learning Python and I thought "Why not do Python for a simple weekly challenge task?" This is the first Python code I've ever truly written and not just modified!
First, the Perl:
say $_ for (sort {$a <=> $b} (map {$_ * $_} @ARGV));
Yep, a one-liner. Normally I prefer to write longer, more readable code, but this time the task was so simple it made sense just to write it on one line.
We map each argument on the command line into its square, then sort (with a numerical sort because map defaults to strings) and then just say() them.
Originally I was sorting with a custom sort routine based on absolute values, but then I realized (thanks to other blog posts) that it would be more efficient not to abs() anything and just to replace everything with its square first, then sort.