DEV Community

Gabor Szabo
Gabor Szabo

Posted on • Originally published at perlweekly.com

Perl πŸͺ Weekly #733 - Perl using AI

Originally published at Perl Weekly 733

Hi there,

AS you know I teach Python and Rust (and I would teach Perl as well if clients were asking for it), and recently I started to wonder how to change my material and my assignment to have any value in the age of AI.

I tried several of the assignments I usually give to my students, pasted them in copilot and got a working solution with tests and documentation. The solutions were good, and way 'better' than what I teach. Better in that they already included input validation, exception, written with separation of concerns. Most of these things are relatively advanced. Well, at least you usually don't learn about them in the first few hours of learning.

The students can also ask the AI to explain each word and each symbol in the code. The question remains of course, if they will understand the language the AI uses or if they need a simpler explanation.

In any case it seems these assignments are now rather useless as the students - especially the ones that are only interested in the credit - will use AI to generate the solution and won't learn a thing. Besides copy-pasting the assignment and the solution.

If you have ideas of how and what should I teach to help them become productive, let me know in an email!

Enjoy your week!

--
Your editor: Gabor Szabo.

Articles

I started to develop SPVM::Mojolicious

Caching in Perl

Redis / Valkey

A Rusty Web? An Excursion of a Perl Guy into Rust Land

AWS Lambda

AWS Lambda is a serverless compute service that allows you to run code without having to manage servers.

Serialisation in Perl

Storable vs Sereal

GPT5 , Perl and PDL

Seems #ChatGPT5 uses Perl along with PDL for the agentic coding step - What does that mean?

GPT5 and Perl

Apparently GPT5 are trained in datasets that overrepresent Perl. Heh?

Tiobe index for August 2025 puts Perl in the top 10 above PHP

For year the Perl community was say how TIOBE is flawed. Now what?

CVE-2025-40909


The Perl Foundation

SUSE Donates USD 11,500 to The Perl and Raku Foundation


Grants

PEVANS Core Perl 5: Grant Report for June/July 2025


Perl

This week in PSC (199) | 2025-08-07


The Weekly Challenge

The Weekly Challenge by Mohammad Sajid Anwar will help you step out of your comfort-zone. You can even win prize money of $50 by participating in the weekly challenge. We pick one champion at the end of the month from among all of the contributors during the month, thanks to the sponsor Lance Wicks.

The Weekly Challenge - 334

Welcome to a new week with a couple of fun tasks "Range Sum" and "Nearest Valid Point". If you are new to the weekly challenge then why not join us and have fun every week. For more information, please read the FAQ.

RECAP - The Weekly Challenge - 333

Enjoy a quick recap of last week's contributions by Team PWC dealing with the "Straight Line" and "Duplicate Zeros" tasks in Perl and Raku. You will find plenty of solutions to keep you busy.

TWC333

The solutions demonstrate deep understanding of both Perl programming and algorithmic thinking, making them excellent reference implementations for these challenges.

Straight Zeros

A well-written, technically sound review that showcases Raku’s capabilities for solving algorithmic problems elegantly. Great for learners interested in Raku or prefix-sum techniques!

Odd last date letters, binary word list buddy

The implementations balance conciseness with readability while leveraging Perl's strengths in text processing. Each solution could be extended with more robust input validation and edge case handling for production use.

Back in the Saddle Again

Both solutions are clean, well-structured Perl code using modern features like postderef, includes good test cases covering various scenarios.

Perl Weekly Challenge: Week 333

These solutions demonstrate deep understanding of both problem domains and Perl programming, making them excellent reference implementations. The mathematical approach to Task 1 is particularly noteworthy for its robustness, while the concise functional solution to Task 2 showcases Perl's expressiveness.

Shift and Duplicate

These implementations serve as excellent examples of how Perl can be used for both mathematical computations and array transformations with equal effectiveness.

streaming numbers

The solutions provide excellent examples of how to solve these problems idiomatically in each language while maintaining the same underlying logic. They showcase Luca's proficiency in multiple programming languages and environments.

Perl Weekly Challenge 333

These solutions are efficient (O(n) time complexity) and handle all edge cases properly. The Perl solutions leverage PDL's powerful matrix operations for Task 1. Both implementations for Task 2 follow a straightforward approach to duplicate zeros while maintaining the original array length.

Double O Straight (Not Stirred)

These implementations serve as excellent examples of how to approach algorithmic problems in Perl, balancing mathematical rigor with language idioms. The dual solutions for Task 2 particularly highlight Perl's flexibility in allowing different programming styles for the same problem.

Zero is Not the End of the Line

The solutions provide excellent examples of how to approach these challenges in different languages while maintaining the same core algorithms. They showcase both the similarities and differences between languages when solving identical problems.

Straight zeroes

The implementations provide excellent examples of how to approach these challenges in Perl, balancing correctness, clarity, and practicality. The detailed output formatting in Task 1 is particularly noteworthy for making the solutions more informative and useful.

The Weekly Challenge #333

Both solutions handle the edge cases mentioned in the problem descriptions and provide the expected outputs for all given examples. The solutions are efficient with time complexity O(n) for both tasks, where n is the number of points or array elements.

Duplicate Straights Are a Line of Zeroes

The solutions match all given test cases and handle edge conditions properly. The Python implementations are concise while remaining readable.

Duplicate Lines

These solutions match all the provided test cases and handle edge conditions properly. The Python solutions use list comprehensions and slicing for conciseness, while the Perl solutions follow similar logic with Perl's array operations.


Weekly collections

NICEPERL's lists

Great CPAN modules released last week;
MetaCPAN weekly report.


Events

Paris.pm monthly meeting

August 13, 2025

Paris.pm monthly meeting

September 10, 2025


You joined the Perl Weekly to get weekly e-mails about the Perl programming language and related topics.

Want to see more? See the archives of all the issues.

Not yet subscribed to the newsletter? Join us free of charge!

(C) Copyright Gabor Szabo
The articles are copyright the respective authors.

Top comments (0)