Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

The Monastery Gates

( [id://131]=superdoc: print w/replies, xml ) Need Help??

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

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

Quests
Wall of Larry Quest
Starts at: Feb 26, 2024 at 05:00
Ends at: Dec 31, 2024 at 04:59
Current Status: Active
2 replies by jdporter

    By now you've all seen The St. Larry Wall Shrine. Well, it could use a fresh coat of gold leaf and shellac. Therefore, we are soliciting Larry-related items to be placed on the shrine. Links to offsite content are good; or if you have small bits of content, such as quotes, you'd like to contribute, that's fine too. Please reply to this Quest with your humble offerings. Thank you! And may St. Larry bless your codings and your debuggings.

poll ideas quest 2024
Starts at: Jan 01, 2024 at 00:00
Ends at: Dec 31, 2024 at 23:59
Current Status: Active
6 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
Toronto Perl Mongers present Randal Schwartz: Half My Life with Perl
on Oct 30, 2024 at 13:18
3 replies by talexb

    As part of year 25 of The Perl Advent Calendar, Perl luminary and co-author of O’Reilly’s “Learning Perl” Randal Schwartz will be giving a presentation entitled "Half My Life with Perl".

    ​This event will be a live stream via Zoom. The stream URL will be provided as we get closer to the date. Please register now if you’re interested in the event, so that we know how many Zoom attendees to plan for.

    Updated October 31, 2024: Sounds interesting, Alex. When is the event? Oh, you forgot that part?

    This will be a virtual event (so don't worry if you can't find your passport), to be held Saturday, December 14, 2024 at 5pm ET -- Google Calendar reliably tells me that's 10pm UTC. A link to the event will be posted when it's available. So far, we have 60 people signed up -- and it's six weeks away. I don't know what the limits are for a Zoom session, but Olaf is working on arranging that.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

The Science Perl Journal, Issue #1 (Vol. 1, No. 1): Summer 2024 is finally here!
on Oct 17, 2024 at 12:51
3 replies by oodler
    TLDR; After hundreds of hours of work and support from lots of people, the long promised Journal is here.

    The rest is more of a rant.
Supplications
Mirroring CPAN by inclusion declaration rather than by exclusion
3 direct replies — Read more / Contribute
by Intrepid
on Nov 08, 2024 at 16:14

    I'd like to mirror a hierarchy of Perl modules from CPAN: everything in ExtUtils:: but nothing else. Like a mini-cpan but not. Minicpan provides for exclusion of modules matching a regex but afaict provides no way to say "exclude everything except this".

    Does anyone have knowledge of an existing script for something like this?
    Thanks for your attention to this rather odd query.

    Nov 08, 2024 at 20:55 UTC

    Examine what is said, not who speaks.
    Love the truth but pardon error.
    Silence betokens consent.
    In the absence of evidence, opinion is indistinguishable from prejudice.
Trouble usig a subroutine from a custom module
2 direct replies — Read more / Contribute
by fritz1968
on Nov 08, 2024 at 12:34

    I was hoping that someone can help me with this issue. I was able to create a use custom Perl modules from my previous employment, but am having an issue at this new job. Unlike the old job, I am not using the server version of perl, but instead, installed a local version to my home directory.

    In this directory (/home/myhomedrive/script/prog1) I have this program called dupCheck.pl:

    #!/home/myhomedrive/opt/perl/bin/perl #use strict; use warnings; use lib '/home/myhomedrive/scripts/lib'; use customPerlMod; my $string = " ll "; $string = trim ( $string );

    As you can see from the code above, I have the custom module here: /home/myhomedrive/scripts/lib

    Here is a snippet of my custom module (I have several different subroutines in it, but for the purposes of this question, I am showing only a few pieces of code):


    #!/home/myhomedrive/opt/perl/bin/perl package customPerlMod; sub trim($) { my $string = shift; $string =~ s/^\s+//; $string =~ s/\s+$//; return $string; } # Left trim function to remove leading whitespace sub ltrim($) { my $string = shift; $string =~ s/^\s+//; return $string; } # Right trim function to remove trailing whitespace sub rtrim($) { my $string = shift; $string =~ s/\s+$//; return $string; } 1;

    when I run the program, I get this at the command prompt:

    ./dupCheck.pl Undefined subroutine &main::trim called at ./dupCheck.pl line 20, <DAT +A> line 960.
    any idea what I am doing wrong?

Entity statistics
1 direct reply — Read more / Contribute
by LexPl
on Nov 08, 2024 at 08:07
    Hi,

    I'm a Perl newbie. My aim is to generate a statistics that lists the number of occurrences for each member of a large group of regex patterns in an xml file. These patterns often also contain ISO entities. I would be very obliged if you could give me your advice to start on this endeavour.

    Examples of such patterns would be "&sect;\s*[0-9])" or "Art\.\s*[0-9IVX]".

    Many thanks in advance!

exists(&subname) causes strange autovivification problem
2 direct replies — Read more / Contribute
by jimav
on Nov 05, 2024 at 18:09
    With "no autovivification" in effect, using "exists &subname" causes strange behavior:
    perl -E ' no autovivification; my @ary; push @ary, exists(&nonesuch); say scalar(@ary) ' # RESULT: 0 perl -E ' no autovivification; my @ary; push @ary, [ exists(&nonesuch) ]; say scalar(@ary) ' # RESULT: Modification of a read-only value attempted at -e line 5
    What's going on here? I don't think exists(&subname) should "autovivify" anything. The docs for 'exists' say "Mentioning a subroutine name for exists or defined does not count as declaring it." I'm using Perl v5.38.2
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-11-12 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    chatterbot is...






    Results (39 votes). Check out past polls.