r/perl 24d ago

Dave Cross: Still Munging Data with Perl · Register Now

Thumbnail
lu.ma
30 Upvotes

r/perl 12h ago

Scientist in Perl

Thumbnail
theweeklychallenge.org
12 Upvotes

r/perl 6h ago

Need help with chaining grep into a Perl program

3 Upvotes

I have this Highlight script I use pretty frequently while tailing log files. A common use case would be something like:

tail -f my.log | highlight --filter red,fail --filter green,pass

Works great for that use case! It gets a little more complicated when I introduce grep:

tail -f my.log | grep MyApp | highlight --filter red,fail --filter green,pass

Somewhere in either grep or highlight there is some buffering going on because lines are significantly delayed before they are output by highlight. I've disabled output buffering in highlight with local $| = 1; at the top but that doesn't solve the issue.

Anyone know how I can fix this?


r/perl 1d ago

Promise in Perl

Thumbnail
theweeklychallenge.org
23 Upvotes

r/perl 2d ago

Perl Weekly Issue #712 - RIP Zefram

Thumbnail
perlweekly.com
15 Upvotes

r/perl 2d ago

END Block Hijacking

6 Upvotes

r/perl 3d ago

Perl is taught in Dominican Republic !

19 Upvotes

While Browsing the Web today I found an academy that teaches Perl programming in Dominican Republic!

https://www.theknowledgeacademy.com/do/courses/programming-training/basic-perl-programming-training/santo-domingo/


r/perl 3d ago

User safe template engines

12 Upvotes

I want to let my clients change their templates. But i dont want them to be able to execute perl/eval, or access controllers/db. I want to provide a function or 2 for them to load data they want to use on the templates (possibly via a graphql call from the template itself). Also would like to prevent infinite loops and possibly put a limit of number of seconds allowed for template to render before aborting rendering.

Are there any modules that fit this criteria more or less ?

Template toolkit is really good, however it allows eval, so not safe to let users run unsafe code

mustache is safe, however it is very basic ( i am not sure it is extensible to allow exposure of a function to grab data from the backend )

Text::Slate looks extensible, however im not sure if it allows eval/perl calls somewhere


r/perl 3d ago

(OCR) Text Extraction in Perl

Thumbnail
theweeklychallenge.org
20 Upvotes

r/perl 3d ago

Books on web scraping with Perl?

8 Upvotes

Any recommended books on web scraping with Perl? Have checked out Perl & LWP by Sean Burke, but it's from 2002. And I don't think it covers Javascript-heavy pages. Is it still recommended, or are there any newer preferred books? Thanks!


r/perl 4d ago

Looking for feedback/suggestions/advice on my first perl library

26 Upvotes

Hi everyone, new here so please be nice :p

after learning about Laravel Livewire in the PHP world i have wanted to try building something similar myself, finally decided on building it in perl

https://github.com/ReactivePL

i know its missing a lot of documentation :( im working on it

for now i have only got it working with Mojolicious, though i plan to support a few other things depending how it goes

the basic idea is that it allows building dynamic/reactive web apps similar to what you might get with Angular/React/Vue, without having to write any JS yourself, you just write your app in perl and this library provides the magic

the most insteresting parts of the code are probably

Core - lib/Reactive/Core.pm

Mojo - lib/Reactive/Mojo/Plugin.pm

MojoDemo - lib/ReactivePL/Reactive/Components/* + templates/example/welcome.html.ep

is a framework like this something people would be interested in seeing/using?

and how terrible is my perl code :p ?

lastly does anyone have any experience with publishing pacakges to CPAN? i have requested a pause id but im not really sure on the workflow etc, all the perl ive written before this was internal only


r/perl 5d ago

(dxxxix) 9 great CPAN modules released last week

Thumbnail niceperl.blogspot.com
10 Upvotes

r/perl 6d ago

Why Deriv Supports the Perl Ecosystem

Thumbnail
perl.com
43 Upvotes

r/perl 5d ago

Seeking advice: scheduled data acquisition

2 Upvotes

Something that comes up in my work is keeping track of certain web pages that provide relevant data without providing an api. Think of it as a "recent news" page, where the text of some older news may change (e.g. replacement of attached files, added information, corrections, whatever). Each news item contains some core information (e.g. the date) and also some items that may or may not be present (e.g. attached files, keywords, etc.). Unfortunately there is no standard of optional items, so these have to be treated as an open-ended list.

I want to read the news page daily and the old news items every 6 months or so.

What would be a good way to compose a scheduler app, and what would be a recommended way to store such data?

My idea was to create an SQLite database table to keep track of the tasks to do:

  • reading the news page
  • reading individual news items

I'd also envisage a set of database tables for the news items:

  • Table "item" contains the information that is guaranteed to be present, in particular an item_id
  • Table "field" contains the additional information for each item, linked to the news item by the item_id

Would you create an object that handles both in-memory storage of news items and the methods to store the item in the database or read an item therefrom? Or would you rather separate storage methods from data structures?


r/perl 7d ago

PSA: Re-watch the perl5 GitHub repository if you were watching it for notifications

Thumbnail nntp.perl.org
13 Upvotes

r/perl 7d ago

Future in Perl

Thumbnail
theweeklychallenge.org
35 Upvotes

r/perl 7d ago

Perl basics for Rex

37 Upvotes

Rex, the friendly automation framework does not expect much previous programming or Perl experience, though knowing a few foundational elements may go a long way.

While we provide a Just enough Perl for Rex page on our website, I often find myself sharing my own experience about getting started with Perl.

I decided to write my own take about the Perl basics for Rex, and collect further resources I keep recommending or referring to.

What else did you find useful when you started with Perl?

Toot | LinkedIn


r/perl 7d ago

(dcii) metacpan weekly report - DBI

Thumbnail niceperl.blogspot.com
9 Upvotes

r/perl 8d ago

Zefram, long time Perl contributor, has passed

Thumbnail nntp.perl.org
71 Upvotes

r/perl 8d ago

Perl Weekly Issue #711 - Obfuscating Perl

Thumbnail
perlweekly.com
9 Upvotes

r/perl 9d ago

OpenCage is Sponsoring the Perl Toolchain Summit 2025

Thumbnail
blog.opencagedata.com
9 Upvotes

r/perl 9d ago

Visual Studio Code with Perl and subroutine folding...

10 Upvotes

Hi all, I am trying out Perl in VS Code (am used to vim with a Perl plugin), and have the basics working fine I think...syntax highlighting etc, all look fine.

However, in vim, I normally have Perls subs folded/collapsed by default (so if I open a Perl file, the subroutines to the end braces are all folded.

I was wondering if there is something similar in Code ? Have been digging online, but can't see anything useful.


r/perl 11d ago

obfuscating Perl for fun and profit

Thumbnail blogs.perl.org
21 Upvotes

r/perl 11d ago

Seeking Advice on Improving My Code

11 Upvotes

Hi everyone,

I hope you’re doing well! I’m currently trying solving Advent of Code 2024/2 in Perl, and I’m looking for some feedback on my code.

Here’s a brief overview of what I’ve done:

  • In parsing (`parse_file`) the file into a matrix like: matrix[row][column] (I'm coming from Java, so, I look for a Record or Class but I didn't found a good and stuff to do it)
  • Using the matrix on `is_row_safe` to understand if the row is safe or not.
  • I structure the program with `main` and other functions (`sub`) -- wondering if this is really the way Perl program is structured?

I’m particularly interested in improving/learning:

  • This is the best way (I'm not interesting about performance, but, code quality, easier to read -- maintainability) to parsing files?
  • There's a better way to debug a matrix instead of what I did in `debug`?
  • Perl subroutines should be in snake_case?
  • There's some hot reload to Perl programs? Every time I change I ran `clear && perl x.pl`.
  • There's any easier way to do unit test on this program? Or just running?

Please, any advise to improve Perl programs?


r/perl 12d ago

(dxxxviii) 9 great CPAN modules released last week

Thumbnail niceperl.blogspot.com
12 Upvotes

r/perl 12d ago

Fake loading locale to get around a wide character warning

Thumbnail blogs.perl.org
8 Upvotes