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 2025
Starts at: Jan 01, 2025 at 00:00
Ends at: Dec 31, 2025 at 23:59
Current Status: Active
4 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
Dotcom Survivor Syndrome – How Perl’s Early Success Created the Seeds of Its Downfall
on Dec 03, 2025 at 04:25
0 replies by mldvx4

    Dave Cross has posted Dotcom Survivor Syndrome – How Perl’s Early Success Created the Seeds of Its Downfall about current misconceptions about Perl and how those misconceptions came to be.

    Can We Move On?

    Dotcom Survivor Syndrome is real. So is Version Number Paralysis. Together, they’ve unfairly buried a language that remains fast, expressive, and battle-tested.

    We can’t change the past. But we can:

    • Acknowledge the emotional and historical baggage
    • Celebrate the role Perl played in inventing the modern web
    • Educate developers about what Perl really is today
    • Push back against the assumption that old == obsolete

    Certain vendors have certainly played the appeal to novelty fallacy to its outer limits to sell their own gimmicks while simultaneously maligning Perl. That'll take a lot to overcome, but is doable.

Advent Calendar 2025
on Dec 01, 2025 at 04:26
0 replies by hippo

    Yes, it's December again which means that it is time for the Perl Advent Calendar.

    It is not too late to contribute to the calendar as they do not yet have 24 articles ready to go and are soliciting entries via the github repo. If there is a favourite module you think the world should know about or some insight you have gained from a particular project now would be a good time to write it up and submit it.

    Happy Advent!


    🦛

Supplications
mtlsproxy feedback
1 direct reply — Read more / Contribute
by linuxlegends
on Dec 16, 2025 at 18:01

    I have this perl code this uses App::Spec and HTTP::Proxy to act as a forward proxy that handles mTLS requests - https://gitlab.com/infrastructure24/mitmtls/-/blob/main/src/mtlsproxy.sh?ref_type=heads. I'm planning on converting it to a CPAN module named App::Mtlsproxy since I was not able to find anything in CPAN that performs this task with a good CLI interface. The PAUSE documentation recommends posting here before uploading to get feedback. Does this seem like a good thing to upload to CPAN?

getting headers from essage
4 direct replies — Read more / Contribute
by Anonymous Monk
on Dec 16, 2025 at 14:25

    I am trying to get some headers from an email message using an imap module but it is getting complicated. I am trying to work with a hash reference in which the keys are the header field names and the values are references to arrays of values. This is what the documentation says. I managed to capture those headers in arrays, but there is always only one element where all the info is stored. It does not matter with 'From' or 'Subject', but with 'To' it is unwanted because there is often more then one of those.So iam trying to get to this array of arrays element I solved it with splitting the string and removing leading and trailing spaces, but it's not fantastic. Could someone have a look at my script and give me some advice on how to proceed? I'll show you what i got so far:

    use strict; use warnings; use Mail::IMAPClient; my $imap = Mail::IMAPClient->new( Server => 'imap.gmail.com', User => 'jim@gmail.com', Password => '*******', Ssl => 1, Debug => 0, ); die "failed to instantiate $@." unless defined $imap; $imap->select('INBOX'); my $msgcount = $imap->message_count(); print "$msgcount number of measages in your mailbox\n\n"; my @messages = $imap->messages; pop(@messages); my $msgid = pop(@messages); my $text = $imap->bodypart_string($msgid,1); my $hashref = $imap->parse_headers( $msgid, "Subject","To","From"); my @sender = @{%$hashref{"From"}}; my @recs = @{%$hashref{"To"}}; my @subject = @{%$hashref{"Subject"}}; my @rec = split(/,/, $recs[0]); print "From: $sender[0]\n"; print "Subject: $subject[0]\n\n"; foreach(@rec){ $_=~ s/^\s+|\s+$//g; print "To: $_\n"; } print $text; $imap->logout();