How does the following work, specifically the triple equal sign print "hello" =~ y===c # -> 4
submitted by /u/Both_Confidence_4147
[link] [comments]
I want to process lines that start on "ROW<number> blabla" and increment the number by 2. Eg: "ROW13 There's a lazy brown fox" -> "ROW15 There's a lazy brown fox".
My first attempt:
perl -pe 's/(\d+)/$1+2/e'
works but replaces numbers EVERYWHERE not just after ROW, so I tried:
perl -pe 's/ROW(\d+)/ROW$1+2/e'
but this doesn't work at all.
submitted by /u/redzorino
[link] [comments]
The latest dev release of Type::Tiny made some changes to its behavior with tie.
Being the kind of person who enjoys playing with shiny new things, I went to see how I could wrangle it into core classes:
```perl use v5.40; use experimental qw<class>;
class Foo { use Types::Standard qw<Int>; field $bar :param; ADJUST {tie $bar, Int, $bar} }
Foo->new(bar => "baz");
Value "baz" did not pass type constraint "Int"
```
Neat!
submitted by /u/m_dango
[link] [comments]
Hey friends, a few weeks back we introduced SlapbirdAPM (an open-source Perl application performance monitor), and received some great feedback from the community! Today we'd like to announce that you are now able to track DBI queries in your applications (only available for Dancer2 and Mojolicious for now), regardless of your database, ORM, etc. Here's what it looks like! You can see the dancer2 code that generated these queries here. preview.redd.it/l2jvz1bne8nd1.… This is just one of the many monitoring features provided by SlapbirdAPM, hopefully you find them as useful as we do! And a reminder we have a *forever* free tier available for everyone! submitted by /u/ivan_linux |
Since the language formerly known as Perl 6 has officially gone off on its own, has there been any effort to implement a true Perl 5 successor?
In my opinion, Raku tried to do too much with the syntax itself, scaled Perl's flexibility to infinity, and made itself unusable.
Perl 5 does not need much for it to become a "modern" language. Instead of extending the flexibility of the syntax, the direction for Perl 6 should emphasize standardizing core utilities to facilitate integration with modern workflows.
- Package/module management and import/export could benefit from streamlining
- Stronger LSP and debug/error tooling (Rust has spoiled me)
- "Prettier" auto-formatting for source code (For those 30yo system scripts, you know the ones I mean)
What would be on your wishlist?
submitted by /u/J_Stach
[link] [comments]
Mo utilities for email.
Changes for 0.02 - 2024-04-26T23:02:53+02:00
- Add tests for error parameters.
- Rewrite the tests so that the functional tests are first and then the errors.