Skip to main content




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 History of Object-Oriented Programming - Uncle Bob submitted by /u/Feisty_Tooth_8219
[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]



submitted by /u/plicease
[link] [comments]


Looking for Claus Färber (github: cfaerber, cpan: CFAERBER) to see if we can get a fix and release in for Net::IDN::Encode on newer versions of #Perl (https://github.com/cfaerber/Net-IDN-Encode/pull/11). If anyone knows how to contact him, please let me know. If nobody is interested, then I am happy to adopt the module.