New here?I want to ask a question of the Perl Monks. Where do I start?

Notices:

hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.

If you're new here, please read PerlMonks FAQ
and Create a new user!

Quests
poll ideas quest 2026
Starts at: Jan 01, 2026 at 00:00
Ends at: Dec 31, 2026 at 23:59
Current Status: Active
0 replies by pollsters
    First, read How do I create a Poll?. Then suggest your poll here. Complete ideas are more likely to be used.

    Note that links may be used in choices but not in the title.

Perl News
Linuxlinks on Perl Static Site Generators
on Feb 20, 2026 at 05:14
0 replies by mldvx4
Perl mentioned at The New Stack
on Feb 13, 2026 at 06:02
3 replies by mldvx4

    The New Stack has mentioned Perl in the context of TIOBE:

    On the scripting side, Perl has also returned to prominence. Once the undisputed leader in scripting, Perl declined after years of internal fragmentation and competition from newer languages, writes Paul Jansen, CEO of TIOBE in the post. “Recently, however, it has staged a comeback, reclaiming a position in the TIOBE top 10 since January 2018,” he writes.

    Perl is actually number 11 on the index right now. It was ranked 30th at the same time last year.

    “It’s hard to judge a programming language’s popularity based on some of the indexes,” Andrew Cornwall, an analyst at Forrester Research, tells The New Stack.

    Statistical language R is making a comeback against Python.

    As we know these rankings are quite arbitrary and the methodology is more than flawed due the selection of repositories surveyed and the ones which get ignored. However, MSFT's long-runnning smear campaign against Perl is losing steam.

Supplications
Modern Subroutine Signature Requires Perl Version
5 direct replies — Read more / Contribute
by InfiniteSilence
on Apr 21, 2026 at 10:01

    I feel like this question has been asked in the past but I could not find it in the search.

    So I am running this code snippet from Dave Cross' blog titled, Summarizing a Month of Git Activity with Perl (and a Little Help from AI) and I ran into a new feature of Perl -- subroutines that take named arguments. We had prototypes in the past but people said they were wonky so I avoided them for the most part.

    So here I am trying to use this thing and I start getting a weird error:

    #!/usr/bin/perl -w use strict; # LEARN: weird -- the method has named parameters ... since v5.36 sub commits_for_month ($repo, $since, $until) { my $cmd = sprintf( q{git -C %s log --since="%s" --until="%s" --pretty=format:"%%s"}, $repo, $since, $until ); my @commits = `$cmd`; chomp @commits; return @commits; } 1;

    I get...,

    llegal character in prototype for main::commits_for_month : $repo, $si +nce, $until at ./gitter.pl line 7. Global symbol "$repo" requires explicit package name (did you forget t +o declare "my $repo"?) at ./gitter.pl line 10. Global symbol "$since" requires explicit package name (did you forget +to declare "my $since"?) at ./gitter.pl line 10. Global symbol "$until" requires explicit package name (did you forget +to declare "my $until"?) at ./gitter.pl line 11. ./gitter.pl had compilation errors.

    My Perl version:

    This is perl 5, version 40, subversion 1 (v5.40.1) built for x86_64-li +nux-thread-multi ...

    When I look this up using Google's handy-dandy AI it tells me all about the normal way to get passed-in parameters in a subroutine and then tells me that this new syntax is available in v5.36. So I add,

    use v5.36;

    To my code and voila, the code compiles,

    perl -c ./gitter.pl ./gitter.pl syntax OK

    Dave's example didn't specify the version like this in his code. Is there something in my environment I am supposed to set to avoid this from happening?

    Celebrate Intellectual Diversity